Skip to content

Commit

Permalink
Slight tweak to garage lock target state
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleBoyer committed Jul 15, 2024
1 parent 57a8409 commit 078e131
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions src/accessory/garage-door.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 078e131

Please sign in to comment.