Skip to content

Commit

Permalink
fix: stop warning about current position being -1
Browse files Browse the repository at this point in the history
  • Loading branch information
apexad committed Apr 2, 2021
1 parent da48799 commit afd31df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platformAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
CharacteristicValue,
CharacteristicSetCallback,
} from 'homebridge';
import { report } from 'process';
import rp from 'request-promise';
import { MySmartBlindsBridgePlatform } from './platform';
import { MYSMARTBLINDS_QUERIES } from './settings';
Expand Down Expand Up @@ -65,7 +66,7 @@ export class MySmartBlindsAccessory {
if (reportCurrentPosition === 99) {
reportCurrentPosition = 100;
}
if (reportCurrentPosition === 1) {
if (reportCurrentPosition === 1 || reportCurrentPosition === -1) {
reportCurrentPosition = 0;
}
if (this.statusLog) {
Expand Down

0 comments on commit afd31df

Please sign in to comment.