From 6bb158786bfcb42b56a5c437812664d4c93f7df3 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 11 Dec 2022 20:10:24 +0100 Subject: [PATCH] Fix for switching WLED off when in nighttime only mode. --- usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h index b03a36ce4..f716e48ec 100644 --- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h +++ b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h @@ -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"); }