Skip to content

Commit

Permalink
fix: fix config entry setup
Browse files Browse the repository at this point in the history
* Fix hass.component.group deprecation

* Fix 2024.7 warnings

* await config entry setup
  • Loading branch information
Petro31 authored Jul 15, 2024
1 parent 461b79f commit ab892fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,8 @@ async def async_update_data() -> Optional[AlexaEntityData]:
)
if not entry_setup:
_LOGGER.debug("Loading config entry for %s", component)
config_entry.async_create_task(
hass,
hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
await hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
else:
_LOGGER.debug("Loading %s", component)
Expand Down
7 changes: 2 additions & 5 deletions custom_components/alexa_media/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,8 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
_LOGGER.debug(
"%s: Loading config entry for %s", hide_email(account), component
)
config_entry.async_create_task(
hass,
hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
await hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
return True
raise ConfigEntryNotReady
Expand Down

0 comments on commit ab892fc

Please sign in to comment.