{"record":{"id":"86261eee03ef13aa","repo":"home-assistant/core","slug":"got-invalid-status-from-device","errorCode":null,"errorMessage":"Got invalid status from device","messagePattern":"Got invalid status from device","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/adax/coordinator.py","lineNumber":96,"sourceCode":"            hass,\n            config_entry=entry,\n            logger=_LOGGER,\n            name=\"AdaxLocal\",\n            update_interval=SCAN_INTERVAL,\n        )\n\n        self.adax_data_handler = AdaxLocal(\n            entry.data[CONF_IP_ADDRESS],\n            entry.data[CONF_TOKEN],\n            websession=async_get_clientsession(hass, verify_ssl=False),\n        )\n\n    @override\n    async def _async_update_data(self) -> dict[str, Any]:\n        \"\"\"Fetch data from the Adax.\"\"\"\n        if result := await self.adax_data_handler.get_status():\n            return cast(dict[str, Any], result)\n        raise UpdateFailed(\"Got invalid status from device\")\n","sourceCodeStart":78,"sourceCodeEnd":97,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/adax/coordinator.py#L78-L97","documentation":"Raised as UpdateFailed by AdaxLocalCoordinator._async_update_data when AdaxLocal.get_status() returns a falsy value (None or empty dict). The local (LAN) Adax device is expected to answer with a JSON status object; a falsy result means the HTTP request failed or the response could not be parsed, so the coordinator treats the poll as failed.","triggerScenarios":"Calling the local Adax API at entry.data[CONF_IP_ADDRESS] with entry.data[CONF_TOKEN] when the device is unreachable, the IP changed (DHCP), the token is wrong, or the device returns an empty/non-JSON body — get_status() then returns None and this UpdateFailed fires.","commonSituations":"Device powered off or rebooting, DHCP reassigned the heater's IP after router restart, wrong or expired local token generated from the device's web UI, or the device firmware no longer serving the local API endpoint.","solutions":["Verify the heater is powered on and on the same network as Home Assistant.","Confirm the configured IP address still routes to the device (ping it); assign a static IP or DHCP reservation.","Regenerate the local API token from the Adax device's web interface and update the config entry.","Test the raw endpoint manually (curl http://<ip>/<endpoint> with the token header) to see what the device actually returns.","If the response is valid but empty, update the adax library — older versions returned None for unexpected JSON shapes."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import asyncio, socket\n\nasync def device_reachable(ip: str) -> bool:\n    \"\"\"TCP-probe the Adax local API port before relying on it.\"\"\"\n    try:\n        _, writer = await asyncio.open_connection(ip, 80, timeout=3)\n        writer.close()\n        return True\n    except OSError:\n        return False","typeGuard":null,"tryCatchPattern":"from homeassistant.exceptions import UpdateFailed\n\ntry:\n    await coordinator.async_refresh()\nexcept UpdateFailed as err:\n    # falsy status == unreachable/misconfigured local device\n    _LOGGER.warning(\"Adax local poll failed: %s\", err)","preventionTips":["Reserve a DHCP address for each Adax heater so the configured IP never drifts.","Health-check the local endpoint after router or device reboots before expecting entities to update.","Regenerate and re-enter the local token promptly after device factory resets."],"tags":["homeassistant","adax","local-api","coordinator","updatefailed"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}