From 56679a041b587916b37f9cbf4961ad2741d99f08 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 16 Mar 2026 13:41:30 -0500 Subject: [PATCH] publish camera state when changing profiles --- frigate/app.py | 4 +++- frigate/config/profile_manager.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frigate/app.py b/frigate/app.py index 9d60d2a08..fef37813a 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -352,7 +352,9 @@ class FrigateApp: ) def init_profile_manager(self) -> None: - self.profile_manager = ProfileManager(self.config, self.inter_config_updater) + self.profile_manager = ProfileManager( + self.config, self.inter_config_updater, self.dispatcher + ) self.dispatcher.profile_manager = self.profile_manager persisted = ProfileManager.load_persisted_profile() diff --git a/frigate/config/profile_manager.py b/frigate/config/profile_manager.py index 37dc1c909..f60cd9a03 100644 --- a/frigate/config/profile_manager.py +++ b/frigate/config/profile_manager.py @@ -42,11 +42,13 @@ class ProfileManager: self, config, config_updater: CameraConfigUpdatePublisher, + dispatcher=None, ): from frigate.config.config import FrigateConfig self.config: FrigateConfig = config self.config_updater = config_updater + self.dispatcher = dispatcher self._base_configs: dict[str, dict[str, dict]] = {} self._base_api_configs: dict[str, dict[str, dict]] = {} self._base_enabled: dict[str, bool] = {} @@ -266,6 +268,12 @@ class ProfileManager: ), cam_config.enabled, ) + if self.dispatcher is not None: + self.dispatcher.publish( + f"{cam_name}/enabled/state", + "ON" if cam_config.enabled else "OFF", + retain=True, + ) continue if section == "zones":