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

  1. Check Airthings status page / whether the Airthings app works.
  2. Verify the API client credentials used by the integration are still valid.
  3. Confirm Home Assistant outbound HTTPS access to the Airthings API.
  4. Wait for the next coordinator cycle — transient failures recover automatically.
  5. 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

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


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/47d9d109eaa375ce. Report an issue: GitHub.