Fix for switching WLED off when in nighttime only mode.

pull/2946/head
Blaz Kristan 2022-12-11 20:10:24 +01:00
rodzic f66d091717
commit 6bb158786b
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -235,7 +235,7 @@ private:
if (offTimerStart > 0 && millis() - offTimerStart > m_switchOffDelay) {
offTimerStart = 0;
if (enabled == true) {
if (!m_mqttOnly && (!m_nightTimeOnly || (m_nightTimeOnly && !isDayTime()))) switchStrip(false);
if (!m_mqttOnly && (!m_nightTimeOnly || (m_nightTimeOnly && !isDayTime()) || PIRtriggered)) switchStrip(false);
else if (NotifyUpdateMode != CALL_MODE_NO_NOTIFY) updateInterfaces(CALL_MODE_WS_SEND);
publishMqtt("off");
}