diff --git a/custom_components/sonos_cloud/__init__.py b/custom_components/sonos_cloud/__init__.py index 3f0a844..62ac479 100644 --- a/custom_components/sonos_cloud/__init__.py +++ b/custom_components/sonos_cloud/__init__.py @@ -38,7 +38,6 @@ async def async_setup(hass: HomeAssistant, config: dict[str, Any]) -> bool: """Set up the Sonos Cloud component.""" hass.data[DOMAIN] = {} - hass.data[DOMAIN][PLAYERS] = [] if DOMAIN not in config: return True @@ -61,6 +60,8 @@ async def async_setup(hass: HomeAssistant, config: dict[str, Any]) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Set up Sonos Cloud from a config entry.""" + hass.data[DOMAIN][PLAYERS] = [] + implementation = ( await config_entry_oauth2_flow.async_get_config_entry_implementation( hass, entry