{"record":{"id":"323c8ed62d85bcfe","repo":"home-assistant/core","slug":"missing-price-data-skipping-update","errorCode":null,"errorMessage":"Missing price data, skipping update","messagePattern":"Missing price data, skipping update","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/amberelectric/coordinator.py","lineNumber":90,"sourceCode":"\n    def update_price_data(self) -> dict[str, dict[str, Any]]:\n        \"\"\"Update callback.\"\"\"\n\n        result: dict[str, dict[str, Any]] = {\n            \"current\": {},\n            \"descriptors\": {},\n            \"forecasts\": {},\n            \"grid\": {},\n        }\n        try:\n            data = self._api.get_current_prices(\n                self.site_id,\n                next=288,\n                _request_timeout=REQUEST_TIMEOUT,\n            )\n            intervals = [interval.actual_instance for interval in data]\n        except ApiException as api_exception:\n            raise UpdateFailed(\"Missing price data, skipping update\") from api_exception\n\n        current = [interval for interval in intervals if is_current(interval)]\n        forecasts = [interval for interval in intervals if is_forecast(interval)]\n        general = [interval for interval in current if is_general(interval)]\n\n        if len(general) == 0:\n            raise UpdateFailed(\"No general channel configured\")\n\n        result[\"current\"][\"general\"] = general[0]\n        result[\"descriptors\"][\"general\"] = normalize_descriptor(general[0].descriptor)\n        result[\"forecasts\"][\"general\"] = [\n            interval for interval in forecasts if is_general(interval)\n        ]\n        result[\"grid\"][\"renewables\"] = round(general[0].renewables)\n        result[\"grid\"][\"price_spike\"] = general[0].spike_status.value\n        tariff_information = general[0].tariff_information\n        if tariff_information:\n            result[\"grid\"][\"demand_window\"] = tariff_information.demand_window","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/amberelectric/coordinator.py#L72-L108","documentation":"UpdateFailed('Missing price data, skipping update') raised in the Amber Electric coordinator when amberelectric-api's get_current_prices() raises ApiException — the HTTP call to the Amber API failed (auth, rate limit, 5xx) or returned no usable interval list. The update is skipped and retried on the next poll.","triggerScenarios":"Coordinator polls calling self._api.get_current_prices(site_id, next=288, _request_timeout=REQUEST_TIMEOUT) which raises ApiException: expired/invalid API token (401), rate limiting (429), or server errors (5xx) from the Amber API.","commonSituations":"Amber API token revoked or regenerated in the Amber app, free-tier rate limits hit by aggressive polling, Amber service incidents, or site_id mismatch after account changes.","solutions":["Verify the Amber API key is valid (re-create it in the Amber app and update the config entry if needed)","Check for 429 rate limiting and reduce update frequency","Check Amber Electric status/announcements for outages","Confirm the site_id in the entry matches the NMI/site in the Amber account"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from amberelectric_api.exceptions import ApiException\ntry:\n    data = api.get_current_prices(site_id, next=288, _request_timeout=REQUEST_TIMEOUT)\nexcept ApiException as e:\n    if e.status in (429, 500, 502, 503):\n        raise UpdateFailed(\"Missing price data, skipping update\") from e  # retried next poll\n    raise  # 401 etc. need user action, not retry","preventionTips":["Keep the Amber API token current; regenerate it in the Amber app when revoked","Respect rate limits — don't add extra parallel consumers of the same token","Check Amber status pages during regional incidents before debugging locally"],"tags":["amberelectric","api","coordinator","polling","homeassistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}