From a177e21a013d45ea858ff252b2b5eb0dc33e7af2 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 8 Mar 2026 15:42:42 -0500 Subject: [PATCH] fix environment_vars timing bug for EnvString substitution FRIGATE_ENV_VARS is populated at module import time but was never updated when environment_vars config section set new vars into os.environ. This meant HA OS users setting FRIGATE_* vars via environment_vars could not use them in EnvString fields. --- frigate/config/env.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/config/env.py b/frigate/config/env.py index 6534ff411..db094a8af 100644 --- a/frigate/config/env.py +++ b/frigate/config/env.py @@ -24,8 +24,10 @@ EnvString = Annotated[str, AfterValidator(validate_env_string)] def validate_env_vars(v: dict[str, str], info: ValidationInfo) -> dict[str, str]: if isinstance(info.context, dict) and info.context.get("install", False): - for k, v in v.items(): - os.environ[k] = v + for k, val in v.items(): + os.environ[k] = val + if k.startswith("FRIGATE_"): + FRIGATE_ENV_VARS[k] = val return v