Skip to content

Commit

Permalink
Fixed transition state
Browse files Browse the repository at this point in the history
  • Loading branch information
justjam2013 committed Nov 26, 2024
1 parent 2b42baf commit a7f54a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/accessories/virtualAccessoryGarageDoor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ export class GarageDoor extends Accessory {
this.platform.log.info(`[${this.accessoryConfiguration.accessoryName}] Setting Target Door State: ${this.getStateName(this.states.GarageDoorTargetState)}`);

// CurrentDoorState CLOSING/OPENING
const transitionState: number = (this.states.GarageDoorTargetState === GarageDoor.OPEN) ? GarageDoor.OPENING : GarageDoor.CLOSING;
this.service!.setCharacteristic(this.platform.Characteristic.CurrentDoorState, (transitionState));
this.platform.log.info(`[${this.accessoryConfiguration.accessoryName}] Setting Curent Door State: ${this.getStateName(transitionState)}`);
this.states.GarageDoorCurrentState = (this.states.GarageDoorTargetState === GarageDoor.OPEN) ? GarageDoor.OPENING : GarageDoor.CLOSING;
this.service!.setCharacteristic(this.platform.Characteristic.CurrentDoorState, (this.states.GarageDoorCurrentState));
this.platform.log.info(`[${this.accessoryConfiguration.accessoryName}] Setting Curent Door State: ${this.getStateName(this.states.GarageDoorCurrentState)}`);

// CurrentDoorState CLOSED/OPEN with 3 second delay
const transitionDelayMillis: number = 3 * 1000;
Expand Down

0 comments on commit a7f54a4

Please sign in to comment.