From ecd4ec76f3cd74115703e1c3b065d234006a7836 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Tue, 15 Feb 2022 20:26:49 +0100 Subject: [PATCH] prevent deepsleep if teleperiod <> 100 or 300 because teleperiod is send directly after start, deepsleep will wait for the second teleperiod in cases where it is defined e.g. to 60. #14860 --- tasmota/xdrv_29_deepsleep.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_29_deepsleep.ino b/tasmota/xdrv_29_deepsleep.ino index 144327d85..ae987ba69 100644 --- a/tasmota/xdrv_29_deepsleep.ino +++ b/tasmota/xdrv_29_deepsleep.ino @@ -178,7 +178,7 @@ bool Xdrv29(uint8_t function) DeepSleepEverySecond(); break; case FUNC_AFTER_TELEPERIOD: - if (DeepSleepEnabled() && !deepsleep_flag) { + if (DeepSleepEnabled() && !deepsleep_flag && (Settings->tele_period == 10 || Settings->tele_period == 300 || millis() > 20000 )) { deepsleep_flag = DEEPSLEEP_START_COUNTDOWN; // Start deepsleep in 4 seconds } break;