mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Make sure multiple True values aren't published for the same motion
This commit is contained in:
parent
4d81a08597
commit
2b35cf8f9b
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user