Fix startup race in cast (#113843)

This commit is contained in:
Erik Montnemery 2024-03-19 22:37:29 +01:00 committed by GitHub
parent 658bef5447
commit bf21553008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,9 +25,9 @@ PLATFORMS = [Platform.MEDIA_PLAYER]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Cast from a config entry."""
hass.data[DOMAIN] = {"cast_platform": {}, "unknown_models": {}}
await home_assistant_cast.async_setup_ha_cast(hass, entry)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
hass.data[DOMAIN] = {"cast_platform": {}, "unknown_models": {}}
await async_process_integration_platforms(hass, DOMAIN, _register_cast_platform)
return True