home-assistant/core · warning · UpdateFailed
Connection to Pro unit lost: {err}
Error message
Connection to Pro unit lost: {err} What it means
UpdateFailed raised when the Samba connection to the AirVisual Pro unit drops mid-operation (NodeConnectionError). Distinctively, the coordinator also schedules a one-shot config entry reload in the background (guarded by reload_task being None) to re-establish the connection, so this error both marks the update failed and triggers self-healing.
Source
Thrown at homeassistant/components/airvisual_pro/coordinator.py:74
self.reload_task: asyncio.Task[bool] | None = None
@override
async def _async_update_data(self) -> dict[str, Any]:
"""Get data from the device."""
try:
data = await self._node.async_get_latest_measurements()
data["history"] = {}
if data["settings"].get("follow_mode") == "device":
history = await self._node.async_get_history(include_trends=False)
data["history"] = history.get("measurements", [])[-1]
except InvalidAuthenticationError as err:
raise ConfigEntryAuthFailed("Invalid Samba password") from err
except NodeConnectionError as err:
if self.reload_task is None:
self.reload_task = self.hass.async_create_task(
self.hass.config_entries.async_reload(self.config_entry.entry_id)
)
raise UpdateFailed(f"Connection to Pro unit lost: {err}") from err
except NodeProError as err:
raise UpdateFailed(f"Error while retrieving data: {err}") from err
return data
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Confirm the Pro unit is powered on and its web dashboard loads.
- Fix the unit's IP with a DHCP reservation or correct the config entry host.
- Let the automatic reload task run — it re-establishes the session without user action.
- Check network stability between Home Assistant and the unit if drops recur.
- Shorten the update interval if SMB idle timeouts are disconnecting the session.
Defensive patterns
Strategy: retry
Type guard
def is_airvisual_pro_connection_lost(err: Exception) -> bool:
return isinstance(err, UpdateFailed) and str(err).startswith("Connection to Pro unit lost") Try / catch
try:
await coordinator.async_refresh()
except UpdateFailed as err:
if str(err).startswith("Connection to Pro unit lost"):
# coordinator already schedules a self-reload; just wait for the next cycle
pass
raise Prevention
- Give the AirVisual Pro unit a DHCP reservation so the Samba target never changes.
- Keep the unit on wired/stable network — WiFi dropouts are the top cause of NodeConnectionError.
- Trust the built-in reload task: do not stack manual reloads on top of it.
When it happens
Trigger: async_get_latest_measurements() or async_get_history() raises NodeConnectionError: unit powered off, network drop to the unit, SMB session terminated by the device (idle timeout, reboot), or unit IP changed so the connection target is stale.
Common situations: Pro unit rebooting or power-cycled, WiFi instability, DHCP address change making the stored connection invalid, or long gaps between polls exceeding the unit's SMB session timeout.
Related errors
- Invalid Samba password
- Error while retrieving data: {err}
- Credential is already linked to a user
- Unable find multi-factor auth module: {mfa_module_id}
- update_error
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/7af885c24119442f.
Report an issue: GitHub.