home-assistant/core · error · UpdateFailed
Cannot connect to Ambient Network
Error message
Cannot connect to Ambient Network
What it means
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.
Source
Thrown at homeassistant/components/ambient_network/coordinator.py:52
super().__init__(
hass,
LOGGER,
config_entry=config_entry,
name=DOMAIN,
update_interval=SCAN_INTERVAL,
)
self.api = api
@override
async def _async_update_data(self) -> dict[str, Any]:
"""Fetch the latest data from the Ambient Network."""
try:
response = await self.api.get_device_details(
self.config_entry.data[CONF_MAC]
)
except RequestError as ex:
raise UpdateFailed("Cannot connect to Ambient Network") from ex
self.station_name = get_station_name(response)
if (last_data := response.get(API_LAST_DATA)) is None:
raise UpdateFailed(
f"Station '{self.config_entry.title}' did not report any data"
)
# Some stations do not report a "created_at" or "dateutc".
# See https://github.com/home-assistant/core/issues/116917
if (ts := last_data.get("created_at")) is not None or (
ts := last_data.get("dateutc")
) is not None:
self.last_measured = datetime.fromtimestamp(
ts / 1000, tz=dt_util.DEFAULT_TIME_ZONE
)
return cast(dict[str, Any], last_data)View on GitHub (pinned to 58a3fdb3ea)
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.
Defensive patterns
Strategy: retry
Try / catch
except UpdateFailed: log and let the DataUpdateCoordinator schedule the next update; escalate only after N consecutive failures.
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable find multi-factor auth module: {mfa_module_id}
- {error}
- Error communicating with API: {err}
- Station '{config_entry.title}' did not report any data
- Error communicating with Homeassistant Analytics
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/337a1d626faab350.
Report an issue: GitHub.