From cdce233f43513a17991775e4e4450f0f1c50c98a Mon Sep 17 00:00:00 2001 From: stefanbode Date: Wed, 4 May 2022 19:04:43 +0200 Subject: [PATCH] Update xdrv_29_deepsleep.ino --- 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 a5a402e90..dc7d76adc 100644 --- a/tasmota/xdrv_29_deepsleep.ino +++ b/tasmota/xdrv_29_deepsleep.ino @@ -120,7 +120,7 @@ void DeepSleepPrepare(void) // It may happen that wakeup in just <5 seconds in future // In this case also add deepsleep to nextwakeup - if (RtcSettings.nextwakeup <= (LocalTime() - DEEPSLEEP_MIN_TIME)) { + if (RtcSettings.nextwakeup <= (LocalTime() + DEEPSLEEP_MIN_TIME)) { // ensure nextwakeup is at least in the future RtcSettings.nextwakeup += (((LocalTime() + DEEPSLEEP_MIN_TIME - RtcSettings.nextwakeup) / Settings->deepsleep) + 1) * Settings->deepsleep; }