|
@@ -313,4 +313,5 @@ class motion_sensor_light(common_base):
|
313
|
313
|
|
314
|
314
|
def cyclic_task(self, cyclic_task):
|
315
|
315
|
min_value = 10 if self.motion_detected() else 0
|
316
|
|
- self.set(self.KEY_TIMER, max(min_value, self[self.KEY_TIMER] - cyclic_task.cycle_time))
|
|
316
|
+ if self[self.KEY_TIMER] != 0:
|
|
317
|
+ self.set(self.KEY_TIMER, max(min_value, self[self.KEY_TIMER] - cyclic_task.cycle_time))
|