diff --git a/package-lock.json b/package-lock.json index 413f183..a489e67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-blaq", - "version": "0.2.14", + "version": "0.2.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "homebridge-blaq", - "version": "0.2.14", + "version": "0.2.15", "license": "Apache-2.0", "dependencies": { "bonjour-service": "^1.2.1", diff --git a/package.json b/package.json index cb09445..ddd0069 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Konnected BlaQ", "name": "homebridge-blaq", - "version": "0.2.14", + "version": "0.2.15", "description": "Control and view your garage door(s) remotely with real-time updates using Konnected's BlaQ hardware", "license": "Apache-2.0", "type": "module", diff --git a/src/accessory/garage-door.ts b/src/accessory/garage-door.ts index 0791ed2..ed81ce2 100644 --- a/src/accessory/garage-door.ts +++ b/src/accessory/garage-door.ts @@ -240,10 +240,10 @@ export class BlaQGarageDoorAccessory implements BaseBlaQAccessory { } getTargetDoorState(): CharacteristicValue { - if(this.currentOperation === 'OPENING' || (this.targetPosition !== undefined && this.targetPosition > 0)){ - return this.platform.characteristic.TargetDoorState.OPEN; - } else if(this.currentOperation === 'CLOSING' || this.preClosing || (this.targetPosition !== undefined && this.targetPosition <= 0)){ + if(this.currentOperation === 'CLOSING' || this.preClosing || (this.targetPosition !== undefined && this.targetPosition <= 0)){ return this.platform.characteristic.TargetDoorState.CLOSED; + } else if(this.currentOperation === 'OPENING' || (this.targetPosition !== undefined && this.targetPosition > 0)){ + return this.platform.characteristic.TargetDoorState.OPEN; } else if(this.currentOperation === 'IDLE'){ if(this.state === 'CLOSED'){ return this.platform.characteristic.TargetDoorState.CLOSED; @@ -406,7 +406,7 @@ export class BlaQGarageDoorAccessory implements BaseBlaQAccessory { this.setPreClosing(true); setTimeout(() => { this.setPreClosing(false); - }, warningDuration); + }, warningDuration + 100); // add 100ms for closing state to happen right after } } catch(e) { this.logger.error('Log parsing error:', e);