1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-17 15:44:52 +01:00

Tibber, handle failed update

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
This commit is contained in:
Daniel Hjelseth Høyer
2026-03-22 08:25:37 +01:00
parent f9bd9f4982
commit e55f89a800

View File

@@ -312,10 +312,13 @@ class TibberPriceCoordinator(DataUpdateCoordinator[dict[str, TibberHomeData]]):
await asyncio.gather(
*(home.update_info_and_price_info() for home in homes_to_update)
)
except tibber.RetryableHttpExceptionError as err:
raise UpdateFailed(f"Error communicating with API ({err.status})") from err
except tibber.FatalHttpExceptionError as err:
raise UpdateFailed(f"Error communicating with API ({err.status})") from err
except (
tibber.RetryableHttpExceptionError,
tibber.FatalHttpExceptionError,
) as err:
_LOGGER.error(
"Error communicating with Tibber API (%s): %s", err.status, err
)
result = {home.home_id: _build_home_data(home) for home in active_homes}