Update payload to fit existing HA standard values

This commit is contained in:
Nick Mowen 2022-05-12 18:47:42 -06:00
parent 2b35cf8f9b
commit ace2735e4e

View File

@ -852,7 +852,7 @@ class TrackedObjectProcessor(threading.Thread):
if self.last_motion_updates.get(camera, 0) == 0:
self.client.publish(
f"{self.topic_prefix}/{camera}/motion/detected",
True,
"ON",
retain=False,
)
@ -866,7 +866,7 @@ class TrackedObjectProcessor(threading.Thread):
if now - self.last_motion_updates.get(camera, 0) >= mqtt_delay:
self.client.publish(
f"{self.topic_prefix}/{camera}/motion/detected",
False,
"OFF",
retain=False,
)
# reset the last_motion so redundant `off` commands aren't sent