{"record":{"id":"015e5e40a25f5ac5","repo":"home-assistant/core","slug":"update-error-015e5e","errorCode":"update_error","errorMessage":"An error occurred while retrieving data from the Airly API for {entry}: {error}","messagePattern":"An error occurred while retrieving data from the Airly API for (.+?): (.+?)","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/airly/coordinator.py","lineNumber":110,"sourceCode":"        )\n\n    @override\n    async def _async_update_data(self) -> dict[str, str | float | int]:\n        \"\"\"Update data via library.\"\"\"\n        data: dict[str, str | float | int] = {}\n        if self.use_nearest:\n            measurements = self.airly.create_measurements_session_nearest(\n                self.latitude, self.longitude, max_distance_km=5\n            )\n        else:\n            measurements = self.airly.create_measurements_session_point(\n                self.latitude, self.longitude\n            )\n        async with timeout(20):\n            try:\n                await measurements.update()\n            except (AirlyError, ClientConnectorError) as error:\n                raise UpdateFailed(\n                    translation_domain=DOMAIN,\n                    translation_key=\"update_error\",\n                    translation_placeholders={\n                        \"entry\": self.config_entry.title,\n                        \"error\": repr(error),\n                    },\n                ) from error\n\n        _LOGGER.debug(\n            \"Requests remaining: %s/%s\",\n            self.airly.requests_remaining,\n            self.airly.requests_per_day,\n        )\n\n        # Airly API sometimes returns None for requests remaining so we update\n        # update_interval only if we have valid value.\n        if self.airly.requests_remaining:\n            self.update_interval = set_update_interval(","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/airly/coordinator.py#L92-L128","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from homeassistant.helpers.update_coordinator import UpdateFailed\n\ntry:\n    data = await coordinator.async_data()\nexcept ConfigEntryNotReady as err:\n    # setup-time UpdateFailed surfaces as NotReady\n    _LOGGER.warning(\"Airly setup failed: %s\", err)","preventionTips":["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"],"tags":["airly","home-assistant","api-key","rate-limit","network"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}