pull in current config version into default config

This commit is contained in:
Josh Hawkins 2025-12-24 08:09:14 -06:00
parent bf01852197
commit 8b7cc127bf

View File

@ -28,6 +28,7 @@ from frigate.util.builtin import (
get_ffmpeg_arg_list,
)
from frigate.util.config import (
CURRENT_CONFIG_VERSION,
StreamInfoRetriever,
convert_area_to_pixels,
find_config_file,
@ -76,11 +77,12 @@ logger = logging.getLogger(__name__)
yaml = YAML()
DEFAULT_CONFIG = """
DEFAULT_CONFIG = f"""
mqtt:
enabled: False
cameras: {} # No cameras defined, UI wizard should be used
cameras: {{}} # No cameras defined, UI wizard should be used
version: {CURRENT_CONFIG_VERSION}
"""
DEFAULT_DETECTORS = {"cpu": {"type": "cpu"}}
@ -753,8 +755,7 @@ class FrigateConfig(FrigateBaseModel):
if new_config and f.tell() == 0:
f.write(DEFAULT_CONFIG)
logger.info(
"Created default config file, see the getting started docs \
for configuration https://docs.frigate.video/guides/getting_started"
"Created default config file, see the getting started docs for configuration: https://docs.frigate.video/guides/getting_started"
)
f.seek(0)