diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h index 1bf7b0d1..a91b396e 100644 --- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h +++ b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h @@ -294,7 +294,8 @@ public: void loop() { // only check sensors 4x/s - if (!enabled || millis() - lastLoop < 250 || strip.isUpdating()) return; + if (!enabled || millis() - lastLoop < 250) return; + if (strip.isUpdating() && (millis() - lastLoop < 250)) return; // WLEDMM be nice, but not too nice lastLoop = millis(); if (!updatePIRsensorState()) {