mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Update payload to fit existing HA standard values
This commit is contained in:
parent
2b35cf8f9b
commit
ace2735e4e
@ -852,7 +852,7 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
if self.last_motion_updates.get(camera, 0) == 0:
|
if self.last_motion_updates.get(camera, 0) == 0:
|
||||||
self.client.publish(
|
self.client.publish(
|
||||||
f"{self.topic_prefix}/{camera}/motion/detected",
|
f"{self.topic_prefix}/{camera}/motion/detected",
|
||||||
True,
|
"ON",
|
||||||
retain=False,
|
retain=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
if now - self.last_motion_updates.get(camera, 0) >= 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,
|
"OFF",
|
||||||
retain=False,
|
retain=False,
|
||||||
)
|
)
|
||||||
# reset the last_motion so redundant `off` commands aren't sent
|
# reset the last_motion so redundant `off` commands aren't sent
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user