home-assistant/core · error · ConfigEntryAuthFailed
Invalid Samba password
Error message
Invalid Samba password
What it means
ConfigEntryAuthFailed raised by the AirVisual Pro coordinator when the Samba connection to the Pro unit rejects the stored credentials (InvalidAuthenticationError). The Pro unit exposes data over SMB file shares, so wrong username/password marks the entry as needing re-authentication rather than retrying.
Source
Thrown at homeassistant/components/airvisual_pro/coordinator.py:68
LOGGER,
config_entry=config_entry,
name="Node/Pro data",
update_interval=UPDATE_INTERVAL,
)
self._node = node
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
- Verify the Samba credentials by opening the unit's share from another machine.
- Use the re-configuration flow in Home Assistant to re-enter username/password.
- After a factory reset, update the entry with the new default credentials.
- Ensure the firmware's SMB auth mode (NTLMv1/v2) is compatible — check unit settings.
Defensive patterns
Strategy: validation
Type guard
def is_airvisual_pro_auth_failed(err: Exception) -> bool:
return isinstance(err, ConfigEntryAuthFailed) and "Samba" in str(err) Try / catch
try:
await coordinator.async_refresh()
except ConfigEntryAuthFailed:
# Samba credentials rejected: re-enter via re-auth flow; retries with same creds will keep failing
await hass.config_entries.async_reload(entry.entry_id) Prevention
- Test Samba access to the Pro unit's share from a PC before adding the integration.
- Re-enter credentials in Home Assistant immediately after changing them on the unit.
- After a factory reset, expect default credentials to apply and update the entry.
When it happens
Trigger: async_get_latest_measurements() raises InvalidAuthenticationError: the Samba username/password in the config entry do not match an account on the AirVisual Pro unit, or the unit's SMB server requires different credentials after a firmware change.
Common situations: Pro unit credentials changed or reset (factory reset restores defaults), password typo at setup that only surfaces at first poll, or firmware updates altering SMB auth modes (e.g. dropping guest access or NTLM versions).
Related errors
- Connection to Pro unit lost: {err}
- Error while retrieving data: {err}
- Unable to deactivate the owner
- System generated users cannot enable multi-factor auth modul
- Authentication failed, please reauthenticate.
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/bd7b69b04a4232d9.
Report an issue: GitHub.