Skip to content

Commit

Permalink
Fix integration reload
Browse files Browse the repository at this point in the history
Fixes #33
  • Loading branch information
jjlawren committed Aug 10, 2022
1 parent 0bb75a2 commit dce6c72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/sonos_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit dce6c72

Please sign in to comment.