mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 02:29:19 +03:00
add CameraProfileConfig model for named config overrides
This commit is contained in:
parent
dd9497baf2
commit
0381c96973
37
frigate/config/camera/profile.py
Normal file
37
frigate/config/camera/profile.py
Normal file
@ -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
|
||||||
Loading…
Reference in New Issue
Block a user