Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed Nov 25, 2024
1 parent 1e17dad commit 69a5bd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/gpioControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ class GpioControl {
value = (await this.adapter.getStateAsync('gpio.' + port + '.state'))?.val;
}

port = parseInt(port, 10);
if (typeof port === 'string') {
port = parseInt(port, 10);
}
if (!this.gpioSettings[port]) {
this.log.warn('Port ' + port + ' is not writable, because disabled.');
return;
Expand Down

0 comments on commit 69a5bd0

Please sign in to comment.