diff --git a/tasmota/support_command.ino b/tasmota/support_command.ino index b0f4d7b2d..b81a86b10 100644 --- a/tasmota/support_command.ino +++ b/tasmota/support_command.ino @@ -323,7 +323,11 @@ void CmndBacklog(void) { if (XdrvMailbox.data_len) { if (0 == XdrvMailbox.index) { + if (!TasmotaGlobal.backlog_nodelay) { + TasmotaGlobal.backlog_sleep = TasmotaGlobal.sleep; + } TasmotaGlobal.backlog_nodelay = true; + TasmotaGlobal.sleep = 0; } #ifdef SUPPORT_IF_STATEMENT diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 38aa5a8ef..94bda17b7 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -170,6 +170,7 @@ struct { uint8_t latching_relay_pulse; // Latching relay pulse timer uint8_t active_device; // Active device in ExecuteCommandPower uint8_t sleep; // Current copy of Settings.sleep + uint8_t backlog_sleep; // Copy of sleep uint8_t leds_present; // Max number of LED supported uint8_t led_inverted; // LED inverted flag (1 = (0 = On, 1 = Off)) uint8_t led_power; // LED power state @@ -404,8 +405,9 @@ void BacklogLoop(void) { } TasmotaGlobal.backlog_mutex = false; } - if (BACKLOG_EMPTY) { + if (BACKLOG_EMPTY && TasmotaGlobal.backlog_nodelay) { TasmotaGlobal.backlog_nodelay = false; + TasmotaGlobal.sleep = TasmotaGlobal.backlog_sleep; } } }