home-assistant/core · error · UpdateFailed
Unable to fetch data: {err}
Error message
Unable to fetch data: {err} What it means
UpdateFailed raised by the Airthings cloud coordinator when airthings.update_devices() raises AirthingsError — any failure talking to the Airthings cloud API (auth token issues classified by the library as generic, network errors, or API errors). The coordinator marks the update failed and retries on the SCAN_INTERVAL schedule.
Source
Thrown at homeassistant/components/airthings/coordinator.py:45
config_entry: AirthingsConfigEntry,
) -> None:
"""Initialize the coordinator."""
super().__init__(
hass,
_LOGGER,
config_entry=config_entry,
name=DOMAIN,
update_method=self._update_method,
update_interval=SCAN_INTERVAL,
)
self.airthings = airthings
async def _update_method(self) -> dict[str, AirthingsDevice]:
"""Get the latest data from Airthings."""
try:
return await self.airthings.update_devices() # type: ignore[no-any-return]
except AirthingsError as err:
raise UpdateFailed(f"Unable to fetch data: {err}") from err
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Check Airthings status page / whether the Airthings app works.
- Verify the API client credentials used by the integration are still valid.
- Confirm Home Assistant outbound HTTPS access to the Airthings API.
- Wait for the next coordinator cycle — transient failures recover automatically.
- Update the airthings library/integration if the API changed.
Defensive patterns
Strategy: retry
Type guard
def is_airthings_update_failed(err: Exception) -> bool:
return isinstance(err, UpdateFailed) and str(err).startswith("Unable to fetch data") Try / catch
try:
await coordinator.async_refresh()
except UpdateFailed as err:
if isinstance(err.__cause__, AirthingsError):
# cloud-side or transient: back off, next scheduled poll will retry
_LOGGER.debug("Airthings refresh failed, will retry: %s", err) Prevention
- Keep Airthings API credentials (client id/secret) current and revoke-aware.
- Do not shorten SCAN_INTERVAL below the API's rate guidance.
- Check the Airthings status page before debugging locally when failures start suddenly.
When it happens
Trigger: update_devices() raises AirthingsError: expired/invalid client credentials, Airthings API outage or 5xx, request timeout, or malformed response from the API during the periodic poll.
Common situations: Airthings cloud incident, API client id/secret revoked, rate limiting from aggressive polling, or network egress problems from the Home Assistant host.
Related errors
- Error communicating with AirPatrol API: {api_err}
- Unable to fetch data for migration: {err}
- System generated users cannot enable multi-factor auth modul
- Unable find multi-factor auth module: {mfa_module_id}
- update_error
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/47d9d109eaa375ce.
Report an issue: GitHub.