Skip to content

Commit

Permalink
fix: Raise ConfigEntryNotReady on timeout exception
Browse files Browse the repository at this point in the history
closes #2283
  • Loading branch information
danielbrunt57 authored Jul 20, 2024
1 parent e5df127 commit e511524
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,14 @@ async def async_update_data() -> Optional[AlexaEntityData]:
)
if not entry_setup:
_LOGGER.debug("Loading config entry for %s", component)
await hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
try:
await hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
except (asyncio.TimeoutError, TimeoutException) as ex:
raise ConfigEntryNotReady(
f"Timeout while loading config entry for {component}"
) from ex
else:
_LOGGER.debug("Loading %s", component)
hass.async_create_task(
Expand Down

0 comments on commit e511524

Please sign in to comment.