home-assistant/core · error · UpdateFailed

exc

Error message

exc

What it means

UpdateFailed raised by the asuswrt bridge's _handle_errors_and_zip decorator whenever the underlying aioasuswrt library call raises one of the configured `exceptions` (connection/SSH errors, timeouts, library errors). The original exception is chained (raise ... from exc); the log line shows 'exc' because the exception object itself is the message. It tells the DataUpdateCoordinator to mark the update failed and retry later.

Source

Thrown at homeassistant/components/asuswrt/bridge.py:103

def handle_errors_and_zip[_AsusWrtBridgeT: AsusWrtBridge](
    exceptions: type[Exception] | tuple[type[Exception], ...], keys: list[str] | None
) -> Callable[[_FuncType[_AsusWrtBridgeT]], _ReturnFuncType[_AsusWrtBridgeT]]:
    """Run library methods and zip results or manage exceptions."""

    def _handle_errors_and_zip(
        func: _FuncType[_AsusWrtBridgeT],
    ) -> _ReturnFuncType[_AsusWrtBridgeT]:
        """Run library methods and zip results or manage exceptions."""

        @functools.wraps(func)
        async def _wrapper(
            self: _AsusWrtBridgeT,
        ) -> dict[str, float | str | None] | dict[str, float]:
            try:
                data = await func(self)
            except exceptions as exc:
                raise UpdateFailed(exc) from exc

            if keys is None:
                if not isinstance(data, dict):
                    raise UpdateFailed("Received invalid data type")
                return data

            if isinstance(data, dict):
                return dict(zip(keys, list(data.values()), strict=False))
            return dict(zip(keys, data, strict=False))

        return _wrapper

    return _handle_errors_and_zip


class AsusWrtBridge(ABC):
    """The Base Bridge abstract class."""

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Check router reachability: ssh from the HA host using the same credentials the integration stores
  2. Fix credentials/host in the integration's Options (reconfigure flow) if SSH auth fails
  3. Update the aioasuswrt library if the router firmware changed its command output
  4. If transient (router reboot), no action: the coordinator retries on its interval
Defensive patterns

Strategy: retry

Try / catch

# Coordinator consumers get UpdateFailed via coordinator.last_exception / UpdateListeners
try:
    await coordinator.async_config_entry_first_refresh()
except ConfigEntryNotReady:
    # bridge-level failures surface as not-ready; inspect __cause__ for the SSH error
    raise

Prevention

When it happens

Trigger: async_get_active_properties / protocol commands failing: SSH connection refused or auth failure to the router, telnet timeouts, aioasuswrt raising its library errors while reading temperature/traffic/etc.

Common situations: Wrong router password or SSH key after router firmware update; router IP changed by DHCP; SSH disabled on the ASUS router; router rebooting.

Related errors


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