From ee8a698ca5c23890ea7f680816325f91b8af8895 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Wed, 29 Aug 2018 14:21:13 -0300 Subject: [PATCH] Added command TIMERS 2 to toggle global timers enable flag #3308 --- sonoff/xdrv_09_timers.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sonoff/xdrv_09_timers.ino b/sonoff/xdrv_09_timers.ino index f74a8d28e..229b55d69 100644 --- a/sonoff/xdrv_09_timers.ino +++ b/sonoff/xdrv_09_timers.ino @@ -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 \ No newline at end of file +#endif // USE_TIMERS