home-assistant/core · warning · ConfigEntryNotReady
Error in Altruist setup
Error message
Error in Altruist setup
What it means
ConfigEntryNotReady('Error in Altruist setup') raised in AltruistCoordinator._async_setup when AltruistClient.from_ip_address() or the initial fetch_data() raises AltruistError (base class of the altruist-client library: connection, timeout, or bad response). Home Assistant will retry setup with backoff; the integration stays unavailable meanwhile.
Source
Thrown at homeassistant/components/altruist/coordinator.py:56
device_id = config_entry.unique_id
super().__init__(
hass,
logger=_LOGGER,
config_entry=config_entry,
name=f"Altruist {device_id}",
update_interval=UPDATE_INTERVAL,
)
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
- Confirm the Altruist device is powered on and reachable at the configured IP (ping / curl its HTTP endpoint)
- If the device IP changed, update the config entry host or assign a static DHCP lease
- Fix local network/firewall issues blocking the host
- Wait for automatic retry or reload the integration once the device is up
Defensive patterns
Strategy: retry
Validate before calling
import socket
# Pre-flight reachability check before (re)loading the entry
try:
socket.getaddrinfo(host, 80)
except socket.gaierror:
_LOGGER.warning("Altruist host %s does not resolve", host) Try / catch
# ConfigEntryNotReady is retried by HA with backoff; in custom setup code:
try:
client = await AltruistClient.from_ip_address(session, host)
except AltruistError as e:
raise ConfigEntryNotReady("Error in Altruist setup") from e Prevention
- Assign the Altruist device a static DHCP reservation so the configured IP stays valid
- Ensure the device is powered before HA restarts
- Allow local HTTP access on the LAN (no client isolation on the Wi-Fi)
When it happens
Trigger: Config entry setup where the local Altruist sensor device at config_entry.data[CONF_HOST] cannot be reached (wrong IP, device offline, HTTP error) or does not respond with valid data — any AltruistError during client construction or first fetch.
Common situations: Static-IP Altruist device got a new DHCP address, device powered off or booting when HA starts, firewall blocking the local HTTP API, or a firmware change altering responses.
Related errors
- The Altruist {device_id} is unavailable: {ex}
- config_entry_not_loaded
- entry_not_loaded
- Could not connect to Autoskope API
- cannot_connect
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/7b5eb9ca7c832a37.
Report an issue: GitHub.