We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e9bd47 commit 07d11c8Copy full SHA for 07d11c8
usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h
@@ -122,6 +122,7 @@ class PIRsensorSwitch : public Usermod
122
*/
123
void switchStrip(bool switchOn)
124
{
125
+ if (m_offOnly && bri && (switchOn || (!PIRtriggered && !switchOn))) return;
126
PIRtriggered = switchOn;
127
if (switchOn && m_onPreset) {
128
applyPreset(m_onPreset);
@@ -227,7 +228,7 @@ class PIRsensorSwitch : public Usermod
227
228
void loop()
229
230
// only check sensors 4x/s
- if (!enabled || millis() - lastLoop < 250 || strip.isUpdating() || (m_offOnly && bri && !PIRtriggered)) return;
231
+ if (!enabled || millis() - lastLoop < 250 || strip.isUpdating()) return;
232
lastLoop = millis();
233
234
if (!updatePIRsensorState()) {
0 commit comments