{"record":{"id":"337a1d626faab350","repo":"home-assistant/core","slug":"cannot-connect-to-ambient-network","errorCode":null,"errorMessage":"Cannot connect to Ambient Network","messagePattern":"Cannot connect to Ambient Network","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/ambient_network/coordinator.py","lineNumber":52,"sourceCode":"        super().__init__(\n            hass,\n            LOGGER,\n            config_entry=config_entry,\n            name=DOMAIN,\n            update_interval=SCAN_INTERVAL,\n        )\n        self.api = api\n\n    @override\n    async def _async_update_data(self) -> dict[str, Any]:\n        \"\"\"Fetch the latest data from the Ambient Network.\"\"\"\n\n        try:\n            response = await self.api.get_device_details(\n                self.config_entry.data[CONF_MAC]\n            )\n        except RequestError as ex:\n            raise UpdateFailed(\"Cannot connect to Ambient Network\") from ex\n\n        self.station_name = get_station_name(response)\n\n        if (last_data := response.get(API_LAST_DATA)) is None:\n            raise UpdateFailed(\n                f\"Station '{self.config_entry.title}' did not report any data\"\n            )\n\n        # Some stations do not report a \"created_at\" or \"dateutc\".\n        # See https://github.com/home-assistant/core/issues/116917\n        if (ts := last_data.get(\"created_at\")) is not None or (\n            ts := last_data.get(\"dateutc\")\n        ) is not None:\n            self.last_measured = datetime.fromtimestamp(\n                ts / 1000, tz=dt_util.DEFAULT_TIME_ZONE\n            )\n\n        return cast(dict[str, Any], last_data)","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/ambient_network/coordinator.py#L34-L70","documentation":"Raised as UpdateFailed when the ambient-weather library's get_device_details call fails with a RequestError (aioambient's base network error). It means the DataUpdateCoordinator could not reach the Ambient Weather API (DNS, TCP, TLS, HTTP 5xx, or timeout). Home Assistant will show the integration as unavailable and retry on the next coordinator update.","triggerScenarios":"Calling self.api.get_device_details(mac) and the underlying aiohttp request raises RequestError: no internet, Ambient API outage/rate limit (HTTP 429/5xx), wrong/expired API key producing an error response the library maps to RequestError, or a proxy blocking the request.","commonSituations":"Internet or firewall outage on the HA host, Ambient Weather cloud maintenance, expired API key/app key in the config entry, or DNS failures in containerized installs.","solutions":["Check internet connectivity from the HA host and that https://api.ambientweather.net responds.","Verify the Ambient Network API key and app key in the config entry; re-auth if expired.","Inspect logs for the chained RequestError (__cause__) which states the exact HTTP/status failure.","If rate limited, increase the coordinator update interval."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"except UpdateFailed: log and let the DataUpdateCoordinator schedule the next update; escalate only after N consecutive failures.","preventionTips":["Keep a valid Ambient Network API key/app key and re-auth when expired.","Monitor HA host internet connectivity; most occurrences are transport-level.","Avoid aggressive update intervals that trip Ambient rate limits."],"tags":["network","coordinator","weather","update-failed"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}