From 40570998d06380b49e10c97f63740f15209c390c Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Wed, 25 Jan 2023 11:53:38 +0100 Subject: [PATCH] Bug-Fix: timer motion_sensor_light --- function/modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/function/modules.py b/function/modules.py index a7176cc..c734ac1 100644 --- a/function/modules.py +++ b/function/modules.py @@ -313,4 +313,5 @@ class motion_sensor_light(common_base): def cyclic_task(self, cyclic_task): min_value = 10 if self.motion_detected() else 0 - self.set(self.KEY_TIMER, max(min_value, self[self.KEY_TIMER] - cyclic_task.cycle_time)) + if self[self.KEY_TIMER] != 0: + self.set(self.KEY_TIMER, max(min_value, self[self.KEY_TIMER] - cyclic_task.cycle_time))