From 0381c96973680dfcb3afb16710a3606704c73b7d Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:46:45 -0600 Subject: [PATCH] add CameraProfileConfig model for named config overrides --- frigate/config/camera/profile.py | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 frigate/config/camera/profile.py diff --git a/frigate/config/camera/profile.py b/frigate/config/camera/profile.py new file mode 100644 index 000000000..3cb8ac3cf --- /dev/null +++ b/frigate/config/camera/profile.py @@ -0,0 +1,37 @@ +"""Camera profile configuration for named config overrides.""" + +from typing import Optional + +from ..base import FrigateBaseModel +from .audio import AudioConfig +from .birdseye import BirdseyeCameraConfig +from .detect import DetectConfig +from .live import CameraLiveConfig +from .motion import MotionConfig +from .notification import NotificationConfig +from .objects import ObjectConfig +from .record import RecordConfig +from .review import ReviewConfig +from .snapshots import SnapshotsConfig + +__all__ = ["CameraProfileConfig"] + + +class CameraProfileConfig(FrigateBaseModel): + """A named profile containing partial camera config overrides. + + Sections set to None inherit from the camera's base config. + Sections that are defined get Pydantic-validated, then only + explicitly-set fields are used as overrides via exclude_unset. + """ + + audio: Optional[AudioConfig] = None + birdseye: Optional[BirdseyeCameraConfig] = None + detect: Optional[DetectConfig] = None + live: Optional[CameraLiveConfig] = None + motion: Optional[MotionConfig] = None + notifications: Optional[NotificationConfig] = None + objects: Optional[ObjectConfig] = None + record: Optional[RecordConfig] = None + review: Optional[ReviewConfig] = None + snapshots: Optional[SnapshotsConfig] = None