mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
Merge pull request #66 from ibs0d/claude/fix-zoom-statistics-WFvOm
fix: sync {camera}/motion topic from camera_activity updates
This commit is contained in:
commit
44feb916c2
@ -149,6 +149,12 @@ function applyCameraActivity(payload: string) {
|
||||
for (const [name, state] of Object.entries(activity)) {
|
||||
applyTopicUpdate(`camera_activity/${name}`, state);
|
||||
|
||||
// Sync motion state so {camera}/motion topic stays up-to-date with
|
||||
// camera_activity and doesn't remain stale from a retained MQTT value.
|
||||
if (state.motion !== undefined) {
|
||||
applyTopicUpdate(`${name}/motion`, state.motion ? "ON" : "OFF");
|
||||
}
|
||||
|
||||
const cameraConfig = state?.config;
|
||||
if (!cameraConfig) continue;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user