home-assistant/core · warning · UpdateFailed

The Altruist {device_id} is unavailable: {ex}

Error message

The Altruist {device_id} is unavailable: {ex}

What it means

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.

Source

Thrown at homeassistant/components/altruist/coordinator.py:63

        )
        self._ip_address = config_entry.data[CONF_HOST]

    @override
    async def _async_setup(self) -> None:
        try:
            self.client = await AltruistClient.from_ip_address(
                async_get_clientsession(self.hass), self._ip_address
            )
            await self.client.fetch_data()
        except AltruistError as e:
            raise ConfigEntryNotReady("Error in Altruist setup") from e

    @override
    async def _async_update_data(self) -> dict[str, str]:
        try:
            fetched_data = await self.client.fetch_data()
        except AltruistError as ex:
            raise UpdateFailed(
                f"The Altruist {self.client.device_id} is unavailable: {ex}"
            ) from ex
        return {item["value_type"]: item["value"] for item in fetched_data}

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Check the device is online and its web UI responds in a browser
  2. Reduce polling frequency if the device's HTTP server is overwhelmed
  3. Stabilize the network (signal, static IP, no IP conflicts)
  4. Inspect the {ex} detail in logs to distinguish timeout vs parse errors; update the altruist-client library if the API changed
Defensive patterns

Strategy: try-catch

Try / catch

try:
    data = await client.fetch_data()
except AltruistError as ex:
    _LOGGER.warning("Altruist %s unavailable: %s", client.device_id, ex)
    # keep last good data; entities show unavailable until next poll

Prevention

When it happens

Trigger: 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.

Common situations: Device firmware restarts, Wi-Fi dropouts for battery/ESP devices, concurrent local requests overloading the small device, or IP conflicts on the LAN.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/ad1b1461735d1b69. Report an issue: GitHub.