Fix processing issue

This commit is contained in:
Nick Mowen 2022-05-01 11:18:51 -06:00
parent 1ef977d340
commit 55640c1d46

View File

@ -859,7 +859,7 @@ class TrackedObjectProcessor(threading.Thread):
now = int(time.time()) now = int(time.time())
# If no motion, make sure the off_delay has passed # If no motion, make sure the off_delay has passed
if now - self.last_motion >= mqtt_delay: if now - self.last_motion_updates.get(camera, 0) >= mqtt_delay:
self.client.publish( self.client.publish(
f"{self.topic_prefix}/{camera}/motion/detected", f"{self.topic_prefix}/{camera}/motion/detected",
False, False,