refactoring
This commit is contained in:
@ -25,6 +25,7 @@ class TimerAdaptor extends AItem {
|
||||
this.state = 'ON';
|
||||
mqtt.send(this.actionStateTopic, this.state, true);
|
||||
this.timer = setTimeout(() => {
|
||||
logger.info(`timer ${this.itemId} elapsed`);
|
||||
this.state = 'OFF';
|
||||
mqtt.send(this.actionStateTopic, this.state, true);
|
||||
}, (this.delay * 1000));
|
||||
|
Reference in New Issue
Block a user