Fix for switching WLED off when in nighttime only mode.
This commit is contained in:
parent
f66d091717
commit
6bb158786b
@ -235,7 +235,7 @@ private:
|
|||||||
if (offTimerStart > 0 && millis() - offTimerStart > m_switchOffDelay) {
|
if (offTimerStart > 0 && millis() - offTimerStart > m_switchOffDelay) {
|
||||||
offTimerStart = 0;
|
offTimerStart = 0;
|
||||||
if (enabled == true) {
|
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);
|
else if (NotifyUpdateMode != CALL_MODE_NO_NOTIFY) updateInterfaces(CALL_MODE_WS_SEND);
|
||||||
publishMqtt("off");
|
publishMqtt("off");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user