Skip to content

Commit

Permalink
Merge pull request #26 from justjam2013/fix-switch-reset
Browse files Browse the repository at this point in the history
Fix switch reset trigger
  • Loading branch information
justjam2013 authored Nov 19, 2024
2 parents bf6282c + 3095fa6 commit 139b9ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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 @@
"name": "homebridge-virtual-accessories",
"displayName": "Virtual Accessories for Homebridge",
"type": "module",
"version": "1.0.2",
"version": "1.0.3",
"description": "Virtual accessories for Homebridge.",
"author": "justjam2013",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/accessories/virtualAccessorySwitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class Switch extends Accessory {
// implement your own code to turn your device on/off
this.states.SwitchState = value as boolean;

if (this.accessoryConfiguration.accessoryHasResetTimer) {
if (this.accessoryConfiguration.accessoryHasResetTimer && this.states.SwitchState !== this.defaultState) {
this.timer!.startTimer();
}

Expand Down

0 comments on commit 139b9ac

Please sign in to comment.