Added command TIMERS 2 to toggle global timers enable flag

#3308
This commit is contained in:
Adrian Scillato 2018-08-29 14:21:13 -03:00 committed by GitHub
parent 7d00289c02
commit ee8a698ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -455,6 +455,9 @@ boolean TimerCommand()
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
Settings.flag3.timers_enable = XdrvMailbox.payload;
}
if (XdrvMailbox.payload == 2) {
Settings.flag3.timers_enable = !Settings.flag3.timers_enable;
}
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, GetStateText(Settings.flag3.timers_enable));
@ -752,4 +755,4 @@ boolean Xdrv09(byte function)
return result;
}
#endif // USE_TIMERS
#endif // USE_TIMERS