From 2b35cf8f9b80533d0559b31e4396292349aac3eb Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Thu, 12 May 2022 16:30:54 -0600 Subject: [PATCH] Make sure multiple True values aren't published for the same motion --- frigate/object_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 29f38d72a..b8f7c6737 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -849,7 +849,7 @@ class TrackedObjectProcessor(threading.Thread): # publish if motion is currently being detected if motion_boxes: # only send True if motion hasn't been detected recently - if self.last_motion_updates[camera] == 0: + if self.last_motion_updates.get(camera, 0) == 0: self.client.publish( f"{self.topic_prefix}/{camera}/motion/detected", True,