From d90e408d50967675deb061ff8b0f999ac20ea940 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 20 Dec 2019 19:56:12 -0600 Subject: [PATCH] set the current object status to off when expired --- frigate/mqtt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frigate/mqtt.py b/frigate/mqtt.py index 8b1fd64d6..c6ab519ab 100644 --- a/frigate/mqtt.py +++ b/frigate/mqtt.py @@ -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) \ No newline at end of file