From 078e131ff887a872806453db900d92877a1798ac Mon Sep 17 00:00:00 2001 From: kyleboyer Date: Mon, 15 Jul 2024 00:37:09 -0500 Subject: [PATCH] Slight tweak to garage lock target state --- package-lock.json | 4 ++-- package.json | 2 +- src/accessory/garage-door.ts | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d959eb5..f8f11e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-blaq", - "version": "0.2.11", + "version": "0.2.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "homebridge-blaq", - "version": "0.2.11", + "version": "0.2.12", "license": "Apache-2.0", "dependencies": { "bonjour-service": "^1.2.1", diff --git a/package.json b/package.json index 79a3b26..7e1605c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Konnected BlaQ", "name": "homebridge-blaq", - "version": "0.2.11", + "version": "0.2.12", "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 64cb60c..f630c03 100644 --- a/src/accessory/garage-door.ts +++ b/src/accessory/garage-door.ts @@ -157,6 +157,13 @@ export class BlaQGarageDoorAccessory implements BaseBlaQAccessory { private setLockState(lockState: LockStateType) { this.lockState = lockState; + const currentlyLocked = this.getLockState() === this.platform.characteristic.LockCurrentState.SECURED; + this.garageDoorService.setCharacteristic( + this.platform.characteristic.LockTargetState, + currentlyLocked ? + this.platform.characteristic.LockTargetState.SECURED : + this.platform.characteristic.LockTargetState.UNSECURED, + ); this.garageDoorService.setCharacteristic( this.platform.characteristic.LockCurrentState, this.getLockState(),