mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-06 06:42:51 +03:00
CI / AMD64 Build (push) Canceled after 0s
CI / AMD64 Smoke Test (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
`notifications.email` is now an `EnvString`, so it can come from `secrets.yaml`, a Docker secret, or a container env var. `/api/config` returns the resolved value, so the email is now redacted for non-admin users, including each camera's inherited copy and the profile `base_config` copy.
31 lines
998 B
Python
31 lines
998 B
Python
from pydantic import Field
|
|
|
|
from ..base import FrigateBaseModel
|
|
from ..env import EnvString
|
|
|
|
__all__ = ["NotificationConfig"]
|
|
|
|
|
|
class NotificationConfig(FrigateBaseModel):
|
|
enabled: bool = Field(
|
|
default=False,
|
|
title="Enable notifications",
|
|
description="Enable or disable notifications for all cameras; can be overridden per-camera.",
|
|
)
|
|
email: EnvString | None = Field(
|
|
default=None,
|
|
title="Notification email",
|
|
description="Email address used for push notifications or required by certain notification providers.",
|
|
)
|
|
cooldown: int = Field(
|
|
default=0,
|
|
ge=0,
|
|
title="Cooldown period",
|
|
description="Cooldown (seconds) between notifications to avoid spamming recipients.",
|
|
)
|
|
enabled_in_config: bool | None = Field(
|
|
default=None,
|
|
title="Original notifications state",
|
|
description="Indicates whether notifications were enabled in the original static configuration.",
|
|
)
|