From 7d516a901676ec4995ab811bbe31f5eceaafdb89 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 26 Dec 2022 10:12:41 +0100 Subject: [PATCH] sunrise sunset improvements for motion sensor --- function/rooms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function/rooms.py b/function/rooms.py index 4c38eac..12cdeed 100644 --- a/function/rooms.py +++ b/function/rooms.py @@ -78,7 +78,7 @@ class room_shelly_motion_sensor(room_shelly): cyclic_task.run() def set_motion_detected(self, device, key, data): - if now() < sunrise_time(60) or now() > sunset_time(-60): + if now() < sunrise_time(60) or now() > sunset_time(-60) or data is False: if device == self.motion_sensor_silvercrest_1: self.motion_detected_1 = data elif device == self.motion_sensor_silvercrest_2: