{"record":{"id":"ad1b1461735d1b69","repo":"home-assistant/core","slug":"the-altruist-device-id-is-unavailable-ex","errorCode":null,"errorMessage":"The Altruist {device_id} is unavailable: {ex}","messagePattern":"The Altruist (.+?) is unavailable: (.+?)","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/altruist/coordinator.py","lineNumber":63,"sourceCode":"        )\n        self._ip_address = config_entry.data[CONF_HOST]\n\n    @override\n    async def _async_setup(self) -> None:\n        try:\n            self.client = await AltruistClient.from_ip_address(\n                async_get_clientsession(self.hass), self._ip_address\n            )\n            await self.client.fetch_data()\n        except AltruistError as e:\n            raise ConfigEntryNotReady(\"Error in Altruist setup\") from e\n\n    @override\n    async def _async_update_data(self) -> dict[str, str]:\n        try:\n            fetched_data = await self.client.fetch_data()\n        except AltruistError as ex:\n            raise UpdateFailed(\n                f\"The Altruist {self.client.device_id} is unavailable: {ex}\"\n            ) from ex\n        return {item[\"value_type\"]: item[\"value\"] for item in fetched_data}\n","sourceCodeStart":45,"sourceCodeEnd":67,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/altruist/coordinator.py#L45-L67","documentation":"UpdateFailed('The Altruist {device_id} is unavailable: {ex}') raised in AltruistCoordinator._async_update_data when client.fetch_data() raises AltruistError during a scheduled poll. The message embeds the device_id and the underlying exception; the coordinator marks the update failed and entities go unavailable until a poll succeeds.","triggerScenarios":"Periodic polling where the HTTP fetch to the Altruist device fails: connection refused (device rebooting), timeout (slow firmware), or a response that fails validation — all surfaced as AltruistError subclasses.","commonSituations":"Device firmware restarts, Wi-Fi dropouts for battery/ESP devices, concurrent local requests overloading the small device, or IP conflicts on the LAN.","solutions":["Check the device is online and its web UI responds in a browser","Reduce polling frequency if the device's HTTP server is overwhelmed","Stabilize the network (signal, static IP, no IP conflicts)","Inspect the {ex} detail in logs to distinguish timeout vs parse errors; update the altruist-client library if the API changed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    data = await client.fetch_data()\nexcept AltruistError as ex:\n    _LOGGER.warning(\"Altruist %s unavailable: %s\", client.device_id, ex)\n    # keep last good data; entities show unavailable until next poll","preventionTips":["Keep polling intervals modest — the small device HTTP server chokes under load","Monitor device uptime; flaky Wi-Fi on ESP-class hardware is the usual cause","Log the underlying exception detail to distinguish timeout from parse errors"],"tags":["altruist","local-device","coordinator","polling","homeassistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}