mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
set the current object status to off when expired
This commit is contained in:
parent
6c87ce0879
commit
d90e408d50
@ -43,4 +43,5 @@ class MqttObjectPublisher(threading.Thread):
|
||||
# expire any objects that are ON and no longer detected
|
||||
expired_objects = [obj_name for obj_name, status in current_object_status.items() if status == 'ON' and not obj_name in obj_counter]
|
||||
for obj_name in expired_objects:
|
||||
current_object_status[obj_name] = 'OFF'
|
||||
self.client.publish(self.topic_prefix+'/'+obj_name, 'OFF', retain=False)
|
Loading…
Reference in New Issue
Block a user