Skip to content

Commit afea9f7

Browse files
authored
Don't mutate config in the check_config helper (home-assistant#104241)
1 parent 67e25dc commit afea9f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

homeassistant/helpers/check_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ async def _get_integration(
232232
config_schema = getattr(component, "CONFIG_SCHEMA", None)
233233
if config_schema is not None:
234234
try:
235-
config = config_schema(config)
235+
validated_config = config_schema(config)
236236
# Don't fail if the validator removed the domain from the config
237-
if domain in config:
238-
result[domain] = config[domain]
237+
if domain in validated_config:
238+
result[domain] = validated_config[domain]
239239
except vol.Invalid as ex:
240240
_comp_error(ex, domain, config, config[domain])
241241
continue

0 commit comments

Comments
 (0)