Skip to content

Commit 6bb1587

Browse files
committed
Fix for switching WLED off when in nighttime only mode.
1 parent f66d091 commit 6bb1587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class PIRsensorSwitch : public Usermod
235235
if (offTimerStart > 0 && millis() - offTimerStart > m_switchOffDelay) {
236236
offTimerStart = 0;
237237
if (enabled == true) {
238-
if (!m_mqttOnly && (!m_nightTimeOnly || (m_nightTimeOnly && !isDayTime()))) switchStrip(false);
238+
if (!m_mqttOnly && (!m_nightTimeOnly || (m_nightTimeOnly && !isDayTime()) || PIRtriggered)) switchStrip(false);
239239
else if (NotifyUpdateMode != CALL_MODE_NO_NOTIFY) updateInterfaces(CALL_MODE_WS_SEND);
240240
publishMqtt("off");
241241
}

0 commit comments

Comments
 (0)