home-assistant/core · error · ConfigEntryAuthFailed

{address}: Authentication failed, try reconfiguring device:

Error message

{address}: Authentication failed, try reconfiguring device: {ex}

What it means

ConfigEntryAuthFailed raised during apple_tv setup when the first connection to the device fails with an authentication error (AUTH_EXCEPTIONS from pyatv, e.g. NoCredentialsError, AuthenticationError). This moves the config entry into a 'reauthenticate' state so the user is prompted to redo pairing instead of HA endlessly retrying a connection that can never succeed.

Source

Thrown at homeassistant/components/apple_tv/__init__.py:98


async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
    """Set up the Apple TV component."""
    async_setup_services(hass)
    return True


async def async_setup_entry(hass: HomeAssistant, entry: AppleTvConfigEntry) -> bool:
    """Set up a config entry for Apple TV."""
    manager = AppleTVManager(hass, entry)

    if manager.is_on:
        address = entry.data[CONF_ADDRESS]

        try:
            await manager.async_first_connect()
        except AUTH_EXCEPTIONS as ex:
            raise ConfigEntryAuthFailed(
                f"{address}: Authentication failed, try reconfiguring device: {ex}"
            ) from ex
        except CONNECTION_TIMEOUT_EXCEPTIONS as ex:
            raise ConfigEntryNotReady(f"{address}: {ex}") from ex
        except DEVICE_EXCEPTIONS as ex:
            _LOGGER.debug(
                "Error setting up apple_tv at %s: %s", address, ex, exc_info=ex
            )
            raise ConfigEntryNotReady(f"{address}: {ex}") from ex

    entry.runtime_data = manager

    async def on_hass_stop(event: Event) -> None:
        """Stop push updates when hass stops."""
        await manager.disconnect()

    entry.async_on_unload(
        hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Open the entry in HA settings and follow the reconfigure/reauthenticate flow to re-pair
  2. Verify you can pair with 'atvremote ... pair' from the pyatv CLI to isolate HA from device issues
  3. If the device was factory reset, remove the integration entry and set it up again from scratch
Defensive patterns

Strategy: fallback

Try / catch

try:
    await manager.async_first_connect()
except AUTH_EXCEPTIONS as ex:
    # surface re-auth to the user instead of retrying blindly

Prevention

When it happens

Trigger: manager.async_first_connect() raises a pyatv authentication exception: device was factory reset (old credentials invalid), credentials were deleted on the Apple TV, the device was re-paired with another system invalidating this one, or pairing never completed for a required protocol.

Common situations: Apple TV updated/reset and dropped paired keys; user re-paired the device with another Home Assistant instance or with pyatv CLI; credentials in the config entry are stale after a hardware swap of the same IP.

Understand the failure class

Related errors


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