Skip to content

Commit

Permalink
fix #357
Browse files Browse the repository at this point in the history
  • Loading branch information
KoljaWindeler committed Dec 29, 2024
1 parent 027e49b commit fcd4f94
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions custom_components/ytube_music_player/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ async def async_setup_entry(hass, config_entry):
config_entry.add_update_listener(async_update_options)

# Add entities to HA
for platform in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, platform)
)
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
return True


Expand All @@ -44,4 +41,4 @@ async def async_update_options(hass, config_entry):
_LOGGER.debug("Config updated,reload the entities.")
for platform in PLATFORMS:
await hass.config_entries.async_forward_entry_unload(config_entry, platform)
hass.async_create_task(hass.config_entries.async_forward_entry_setup(config_entry, platform))
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

0 comments on commit fcd4f94

Please sign in to comment.