Fix File entry setup config parsing whole YAML config (#117206)

Fix File entry setup config parsingwhole YAML config
This commit is contained in:
Jan Bouwhuis 2024-05-10 22:05:40 +02:00 committed by GitHub
parent db6e3f7cbf
commit c21dac855a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
) )
# Import the YAML config into separate config entries # 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: for item in items:
if item[CONF_PLATFORM] == DOMAIN: if item[CONF_PLATFORM] == DOMAIN:
item[CONF_PLATFORM] = domain item[CONF_PLATFORM] = domain