From 6a5031f1ec79bca4afbe96e2cb3e45a5efcbaf08 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 31 May 2026 12:05:09 -0500 Subject: [PATCH] add config migrator to remove date_style and time_style --- frigate/util/config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frigate/util/config.py b/frigate/util/config.py index 431c8bff53..186730dbfb 100644 --- a/frigate/util/config.py +++ b/frigate/util/config.py @@ -618,6 +618,16 @@ def migrate_018_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any] new_config["cameras"][name] = camera_config + # Remove deprecated date_style and time_style from global ui config + global_ui = new_config.get("ui", {}) + if global_ui.get("date_style") is not None: + del new_config["ui"]["date_style"] + if global_ui.get("time_style") is not None: + del new_config["ui"]["time_style"] + # Remove ui section if empty + if "ui" in new_config and not new_config["ui"]: + del new_config["ui"] + new_config["version"] = "0.18-0" return new_config