refactoring
This commit is contained in:
@ -34,10 +34,8 @@ class TimerAdaptor extends AItem {
|
|||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
if (this.state == 'OFF') {
|
if (this.state == 'OFF') {
|
||||||
this.state = 'ON';
|
this.state = 'ON';
|
||||||
this.overwrite = true;
|
|
||||||
} else {
|
} else {
|
||||||
this.state = 'OFF';
|
this.state = 'OFF';
|
||||||
this.overwrite = false;
|
|
||||||
}
|
}
|
||||||
mqtt.send(this.actionStateTopic, this.state, true);
|
mqtt.send(this.actionStateTopic, this.state, true);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user