{"record":{"id":"01aac605856037c7","repo":"home-assistant/core","slug":"current-conditions-update-error","errorCode":"current_conditions_update_error","errorMessage":"An error occurred while retrieving weather current conditions data from the AccuWeather API: {error}","messagePattern":"An error occurred while retrieving weather current conditions data from the AccuWeather API: (.+?)","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/accuweather/coordinator.py","lineNumber":87,"sourceCode":"\n        self.device_info = _get_device_info(self.location_key, name)\n\n        super().__init__(\n            hass,\n            _LOGGER,\n            config_entry=config_entry,\n            name=f\"{name} (observation)\",\n            update_interval=UPDATE_INTERVAL_OBSERVATION,\n        )\n\n    @override\n    async def _async_update_data(self) -> dict[str, Any]:\n        \"\"\"Update data via library.\"\"\"\n        try:\n            async with timeout(10):\n                result = await self.accuweather.async_get_current_conditions()\n        except EXCEPTIONS as error:\n            raise UpdateFailed(\n                translation_domain=DOMAIN,\n                translation_key=\"current_conditions_update_error\",\n                translation_placeholders={\"error\": repr(error)},\n            ) from error\n        except InvalidApiKeyError as err:\n            raise ConfigEntryAuthFailed(\n                translation_domain=DOMAIN,\n                translation_key=\"auth_error\",\n                translation_placeholders={\"entry\": self.config_entry.title},\n            ) from err\n\n        _LOGGER.debug(\"Requests remaining: %d\", self.accuweather.requests_remaining)\n\n        return result\n\n\nclass AccuWeatherForecastDataUpdateCoordinator(\n    TimestampDataUpdateCoordinator[list[dict[str, Any]]]","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/accuweather/coordinator.py#L69-L105","documentation":"UpdateFailed raised by the AccuWeather observation coordinator when fetching current conditions raises one of the coordinator's generic EXCEPTIONS (e.g. asyncio timeout after 10s, aiohttp ClientError, ApiError) inside _async_update_data. It marks the update failed so DataUpdateCoordinator logs and schedules a retry; the user-facing text comes from translation key current_conditions_update_error with the exception repr as placeholder.","triggerScenarios":"self.accuweather.async_get_current_conditions() inside async with timeout(10) raises a network/API exception (timeout, connection reset, AccuWeather ApiError).","commonSituations":"AccuWeather API free-tier rate limit exhaustion, internet outage, 10-second timeout on slow mobile links, invalid/expired API key returning errors that surface as ApiError.","solutions":["Check requests remaining in debug logs (_LOGGER.debug('Requests remaining: %d')) — if 0, the free tier limit (50/day) is hit; wait for reset or reduce update interval","Verify internet/DNS from the host and that no firewall blocks api.accuweather.com","If it fails persistently, test the API key directly against https://dataservice.accuweather.com/currentconditions/v1/","Increase confidence in connectivity then let the coordinator retry; only re-create the entry if the key itself is wrong (that raises InvalidApiKeyError → auth_error instead)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    async with timeout(10):\n        result = await self.accuweather.async_get_current_conditions()\nexcept EXCEPTIONS as error:\n    raise UpdateFailed(\n        translation_domain=DOMAIN,\n        translation_key=\"current_conditions_update_error\",\n        translation_placeholders={\"error\": repr(error)},\n    ) from error","preventionTips":["Use translation keys + placeholders instead of hardcoded strings","Catch library-specific exceptions explicitly; let auth errors fall to a separate handler","Pick update intervals that respect API quota"],"tags":["coordinator","network","accuweather","rate-limit","retryable"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}