{"record":{"id":"d1cdb221093d60d4","repo":"home-assistant/core","slug":"err-d1cdb2","errorCode":null,"errorMessage":"err","messagePattern":"err","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/awair/coordinator.py","lineNumber":99,"sourceCode":"\n        super().__init__(hass, config_entry, UPDATE_INTERVAL_CLOUD)\n\n    @override\n    async def _async_update_data(self) -> dict[str, AwairResult]:\n        \"\"\"Update data via Awair client library.\"\"\"\n        async with timeout(API_TIMEOUT):\n            try:\n                LOGGER.debug(\"Fetching users and devices\")\n                user = await self._awair.user()\n                devices = await user.devices()\n                results = await gather(\n                    *(self._fetch_air_data(device) for device in devices)\n                )\n                return {result.device.uuid: result for result in results}\n            except AuthError as err:\n                raise ConfigEntryAuthFailed from err\n            except Exception as err:\n                raise UpdateFailed(err) from err\n\n\nclass AwairLocalDataUpdateCoordinator(AwairDataUpdateCoordinator):\n    \"\"\"Define a wrapper class to update Awair data from the local API.\"\"\"\n\n    _device: AwairLocalDevice | None = None\n\n    def __init__(\n        self,\n        hass: HomeAssistant,\n        config_entry: AwairConfigEntry,\n        session: ClientSession,\n    ) -> None:\n        \"\"\"Set up the AwairLocalDataUpdateCoordinator class.\"\"\"\n        self._awair = AwairLocal(\n            session=session, device_addrs=[config_entry.data[CONF_HOST]]\n        )\n","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/awair/coordinator.py#L81-L117","documentation":"In the Awair cloud coordinator, any non-auth exception raised while fetching the user, device list, or air data inside the timeout window is re-raised as UpdateFailed(err). This is the catch-all for rate limits, HTTP 5xx, malformed responses, and asyncio.TimeoutError from async with timeout(API_TIMEOUT). AuthError is handled separately as ConfigEntryAuthFailed (no message).","triggerScenarios":"Calls to self._awair.user(), user.devices(), or parallel _fetch_air_data(device) tasks raise aiohttp/awair library errors; or the whole batch exceeds API_TIMEOUT; or the Awair cloud API returns 429/500.","commonSituations":"Awair API rate limiting (too many devices polled per scan interval); Awair cloud outage; slow network causing timeout; expired/invalid token surfacing as a generic error rather than AuthError.","solutions":["If transient (rate limit/outage), wait — UpdateFailed just delays the next refresh.","Increase the integration's scan interval to reduce API pressure (many devices x frequent polls triggers 429).","For local devices, switch to the local API config entry (AwairLocalDataUpdateCoordinator) which bypasses the cloud.","If timeouts dominate, check network latency from HA to the Awair API."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from homeassistant.helpers.update_coordinator import UpdateFailed, DataUpdateCoordinator\n\ntry:\n    data = await coordinator.async_refresh()\nexcept UpdateFailed as err:\n    # keep last good coordinator.data; entities stay stale, not unavailable\n    data = coordinator.data","preventionTips":["Prefer the local API for Awair devices on the same LAN — fewer cloud failure modes.","Keep scan intervals modest to stay under Awair cloud rate limits.","Distinguish auth failures (ConfigEntryAuthFailed) from generic UpdateFailed before troubleshooting."],"tags":["home-assistant","coordinator","api","rate-limit","awair"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}