home-assistant/core · error · HomeAssistantError

{err}

Error message

{err}

What it means

HomeAssistantError raised inside update_handle (built by AdvantageAirEntity.update_handle_factory) when the wrapped API func(*keys, *values) raises ApiError. Every Advantage Air entity command (set temperature, fan speed, zone open/close, lights, etc.) goes through this wrapper, so any controller-side failure during a command surfaces here and also skips the coordinator refresh that only runs on success.

Source

Thrown at homeassistant/components/advantage_air/entity.py:37

    _attr_has_entity_name = True

    def __init__(self, coordinator: AdvantageAirCoordinator) -> None:
        """Initialize common aspects of an Advantage Air entity."""
        super().__init__(coordinator)
        self._attr_unique_id: str = self.coordinator.data["system"]["rid"]

    def update_handle_factory(self, func, *keys):
        """Return the provided API function wrapped.

        Adds an error handler and coordinator refresh, and presets keys.
        """

        async def update_handle(*values):
            try:
                if await func(*keys, *values):
                    await self.coordinator.async_request_refresh()
            except ApiError as err:
                raise HomeAssistantError(err) from err

        return update_handle


class AdvantageAirAcEntity(AdvantageAirEntity):
    """Parent class for Advantage Air AC Entities."""

    def __init__(self, coordinator: AdvantageAirCoordinator, ac_key: str) -> None:
        """Initialize common aspects of an Advantage Air ac entity."""
        super().__init__(coordinator)

        self.ac_key: str = ac_key
        self._attr_unique_id += f"-{ac_key}"

        self._attr_device_info = DeviceInfo(
            via_device_id=dr.async_get_device_id_by_identifier(
                self.coordinator.hass,
                (DOMAIN, self.coordinator.data["system"]["rid"]),

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Confirm the controller is online (its web UI loads) and retry the action.
  2. Read the wrapped ApiError text — it states whether it was a transport failure or a rejected value (e.g. out-of-range setpoint).
  3. For recurring automation failures, add a condition checking the integration/coordinator's last_update_success before issuing commands.
  4. If the value was rejected, correct the automation to send values within the controller's supported ranges.
  5. Restart the controller if it consistently rejects valid commands — a known recovery for wedged local APIs.
Defensive patterns

Strategy: try-catch

Try / catch

from homeassistant.exceptions import HomeAssistantError

try:
    await hass.services.async_call(
        "climate", "set_temperature",
        {"entity_id": entity_id, "temperature": 22.0},
    )
except HomeAssistantError as err:
    # wraps the controller's ApiError; check transport vs rejected value
    _LOGGER.warning("Advantage Air command failed: %s", err)

Prevention

When it happens

Trigger: Any entity action — climate.set_temperature, cover position on a zone damper, light/switch on the controller, fan mode — issued while the controller is offline or rejects the request; ApiError propagates and is re-raised as HomeAssistantError(err).

Common situations: Controller briefly offline when an automation fires; stale entity state after HA restart letting the UI send out-of-range values the controller rejects; network flakiness between HA and the AC unit.

Related errors


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