home-assistant/core · error · UpdateFailed
update_error
update_error
Error message
An error occurred while retrieving data from the Airly API for {entry}: {error} What it means
Raised by the Airly DataUpdateCoordinator when measurements.update() (nearest or point session) raises AirlyError or aiohttp ClientConnectorError within the 20s timeout. It becomes UpdateFailed with translation key update_error, carrying the config entry title and repr(error); the coordinator will retry on its schedule.
Source
Thrown at homeassistant/components/airly/coordinator.py:110
)
@override
async def _async_update_data(self) -> dict[str, str | float | int]:
"""Update data via library."""
data: dict[str, str | float | int] = {}
if self.use_nearest:
measurements = self.airly.create_measurements_session_nearest(
self.latitude, self.longitude, max_distance_km=5
)
else:
measurements = self.airly.create_measurements_session_point(
self.latitude, self.longitude
)
async with timeout(20):
try:
await measurements.update()
except (AirlyError, ClientConnectorError) as error:
raise UpdateFailed(
translation_domain=DOMAIN,
translation_key="update_error",
translation_placeholders={
"entry": self.config_entry.title,
"error": repr(error),
},
) from error
_LOGGER.debug(
"Requests remaining: %s/%s",
self.airly.requests_remaining,
self.airly.requests_per_day,
)
# Airly API sometimes returns None for requests remaining so we update
# update_interval only if we have valid value.
if self.airly.requests_remaining:
self.update_interval = set_update_interval(View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Check the wrapped repr(error) in the log: 401/403 means bad or rate-limited API key
- Verify internet connectivity from the HA host to api.airly.eu
- Wait for the daily quota to reset or upgrade/replace the API key, then reload the integration
- Confirm coordinates in the config entry are valid floats within Airly coverage (mostly Europe)
Defensive patterns
Strategy: retry
Try / catch
from homeassistant.helpers.update_coordinator import UpdateFailed
try:
data = await coordinator.async_data()
except ConfigEntryNotReady as err:
# setup-time UpdateFailed surfaces as NotReady
_LOGGER.warning("Airly setup failed: %s", err) Prevention
- Keep a valid, quota-backed Airly API key and monitor requests_remaining
- Verify the API key with a single curl before configuring multiple entries
- The integration self-throttles its update interval from remaining quota — do not add parallel pollers with the same key
When it happens
Trigger: API key invalid/expired (AirlyError), HTTP 4xx from the Airly API, rate limit exceeded (403 with quota exhausted), or network-level failure (ClientConnectorError) reaching api.airly.eu; also any update taking longer than 20 seconds hits asyncio timeout (not caught here, propagates as TimeoutError).
Common situations: Free-tier Airly API key exhausted for the day (rate limiting adjusts the update interval only when requests_remaining is known), wrong API key pasted, or HA host losing internet access.
Related errors
- {error}
- Credential is already linked to a user
- Unable find multi-factor auth module: {mfa_module_id}
- current_conditions_update_error
- forecast_update_error
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/015e5e40a25f5ac5.
Report an issue: GitHub.