sunrise sunset improvements for motion sensor
This commit is contained in:
parent
74a981fc1f
commit
7d516a9016
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user