mirror of
https://github.com/dtwardow/homebridge-multi-tap-switch.git
synced 2026-11-01 20:18:30 +00:00
Disable resetTimeout when configured value is 0
This commit is contained in:
1 parent
05c16f6ea7
commit
6ef1507d79
1 file changed
+5
-1
@@ -158,8 +158,12 @@ export class DeviceAccessory {
|
||||
if (this.SwitchResetTimer) {
|
||||
clearTimeout(this.SwitchResetTimer);
|
||||
}
|
||||
// Start the reset timer
|
||||
|
||||
// Start the reset timer, if paramter is greater than 0.
|
||||
// Otherwise, do nothing.
|
||||
if (this.State.triggerTimeout > 0) {
|
||||
this.SwitchResetTimer = setTimeout(this.resetTrigger.bind(this), this.State.triggerTimeout * 1000);
|
||||
}
|
||||
|
||||
// Trigger Scene
|
||||
this.triggerNext();
|
||||
|
||||
Reference in new issue
Block a user