mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Fix startup race in cast (#113843)
This commit is contained in:
parent
658bef5447
commit
bf21553008
@ -25,9 +25,9 @@ PLATFORMS = [Platform.MEDIA_PLAYER]
|
|||||||
|
|
||||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
"""Set up Cast from a config entry."""
|
"""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 home_assistant_cast.async_setup_ha_cast(hass, entry)
|
||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
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)
|
await async_process_integration_platforms(hass, DOMAIN, _register_cast_platform)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user