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

  1. Verify the Samba credentials by opening the unit's share from another machine.
  2. Use the re-configuration flow in Home Assistant to re-enter username/password.
  3. After a factory reset, update the entry with the new default credentials.
  4. 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

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


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