mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Don't mutate config in the check_config helper (#104241)
This commit is contained in:
parent
67e25dc0bf
commit
afea9f7739
@ -232,10 +232,10 @@ async def async_check_ha_config_file( # noqa: C901
|
|||||||
config_schema = getattr(component, "CONFIG_SCHEMA", None)
|
config_schema = getattr(component, "CONFIG_SCHEMA", None)
|
||||||
if config_schema is not None:
|
if config_schema is not None:
|
||||||
try:
|
try:
|
||||||
config = config_schema(config)
|
validated_config = config_schema(config)
|
||||||
# Don't fail if the validator removed the domain from the config
|
# Don't fail if the validator removed the domain from the config
|
||||||
if domain in config:
|
if domain in validated_config:
|
||||||
result[domain] = config[domain]
|
result[domain] = validated_config[domain]
|
||||||
except vol.Invalid as ex:
|
except vol.Invalid as ex:
|
||||||
_comp_error(ex, domain, config, config[domain])
|
_comp_error(ex, domain, config, config[domain])
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user