Merge pull request #3638 from ascillato/patch-1

Add command TIMERS 2 to toggle global timers enable flag
This commit is contained in:
Theo Arends 2018-08-30 11:44:58 +02:00 committed by GitHub
commit 1fad13dc91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

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