From afea9f773924f132a753802ef1364fbce4edfd3e Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 20 Nov 2023 12:55:27 +0100 Subject: [PATCH] Don't mutate config in the check_config helper (#104241) --- homeassistant/helpers/check_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/check_config.py b/homeassistant/helpers/check_config.py index ea5e7218f1f..23707949dcd 100644 --- a/homeassistant/helpers/check_config.py +++ b/homeassistant/helpers/check_config.py @@ -232,10 +232,10 @@ async def async_check_ha_config_file( # noqa: C901 config_schema = getattr(component, "CONFIG_SCHEMA", None) if config_schema is not None: try: - config = config_schema(config) + validated_config = config_schema(config) # Don't fail if the validator removed the domain from the config - if domain in config: - result[domain] = config[domain] + if domain in validated_config: + result[domain] = validated_config[domain] except vol.Invalid as ex: _comp_error(ex, domain, config, config[domain]) continue