Skip to content

Commit

Permalink
Fix File entry setup config parsing whole YAML config (home-assistant…
Browse files Browse the repository at this point in the history
…#117206)

Fix File entry setup config parsingwhole YAML config
  • Loading branch information
jbouwh authored May 10, 2024
1 parent db6e3f7 commit c21dac8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/components/file/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
)

# Import the YAML config into separate config entries
for domain, items in config.items():
platforms_config = {
domain: config[domain] for domain in YAML_PLATFORMS if domain in config
}
for domain, items in platforms_config.items():
for item in items:
if item[CONF_PLATFORM] == DOMAIN:
item[CONF_PLATFORM] = domain
Expand Down

0 comments on commit c21dac8

Please sign in to comment.