{"record":{"id":"818324510688686c","repo":"home-assistant/core","slug":"oauth2-implementation-unavailable","errorCode":"oauth2_implementation_unavailable","errorMessage":"oauth2_implementation_unavailable","messagePattern":"oauth2_implementation_unavailable","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"error","filePath":"homeassistant/components/aladdin_connect/__init__.py","lineNumber":41,"sourceCode":"from . import api\nfrom .const import CONFIG_FLOW_MINOR_VERSION, CONFIG_FLOW_VERSION, DOMAIN\nfrom .coordinator import AladdinConnectConfigEntry, AladdinConnectCoordinator\n\nPLATFORMS: list[Platform] = [Platform.COVER, Platform.SENSOR]\n\n\nasync def async_setup_entry(\n    hass: HomeAssistant, entry: AladdinConnectConfigEntry\n) -> bool:\n    \"\"\"Set up Aladdin Connect Genie from a config entry.\"\"\"\n    try:\n        implementation = (\n            await config_entry_oauth2_flow.async_get_config_entry_implementation(\n                hass, entry\n            )\n        )\n    except ImplementationUnavailableError as err:\n        raise ConfigEntryNotReady(\n            translation_domain=DOMAIN,\n            translation_key=\"oauth2_implementation_unavailable\",\n        ) from err\n\n    session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation)\n\n    try:\n        await session.async_ensure_token_valid()\n    except OAuth2TokenRequestReauthError as err:\n        raise ConfigEntryAuthFailed(err) from err\n    except (OAuth2TokenRequestError, aiohttp.ClientError) as err:\n        raise ConfigEntryNotReady from err\n\n    client = AladdinConnectClient(\n        api.AsyncConfigEntryAuth(aiohttp_client.async_get_clientsession(hass), session)\n    )\n\n    coordinator = AladdinConnectCoordinator(hass, entry, client)","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/aladdin_connect/__init__.py#L23-L59","documentation":"ConfigEntryNotReady raised with translation_key 'oauth2_implementation_unavailable' during async_setup_entry when async_get_config_entry_implementation raises ImplementationUnavailableError. This means the OAuth2 backend (in this integration, the cloud-supplied Genie/Aladdin application credentials) that issued the token is no longer registered with Home Assistant, so HA cannot refresh the token. The entry retries setup later.","triggerScenarios":"Config entry created by an OAuth flow whose implementation was provided by another integration or a removed custom component; after uninstalling that provider or a HA downgrade, the implementation lookup fails at setup.","commonSituations":"Aladdin Connect entry set up via an application credential from a custom integration that was removed; HA restored from backup missing the provider; entity/platform reorganization between HA versions.","solutions":["Ensure the integration/application credentials that supplied the OAuth implementation are installed and loaded.","If the original provider is gone, delete the config entry and re-create it through the normal integration flow.","Restart HA once after restoring providers so registrations rebuild.","Check the HA log for the chained ImplementationUnavailableError to identify the missing implementation."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"from homeassistant.helpers import config_entry_oauth2_flow\n\ntry:\n    impl = await config_entry_oauth2_flow.async_get_config_entry_implementation(hass, entry)\nexcept config_entry_oauth2_flow.ImplementationUnavailableError:\n    # provider missing: guide user to reinstall provider or re-create entry\n    ...","typeGuard":null,"tryCatchPattern":"try:\n    await hass.config_entries.async_setup(entry.entry_id)\nexcept ConfigEntryNotReady:\n    # HA retries automatically; surface 'check OAuth provider' message to user","preventionTips":["Install and load the integration that provides the OAuth application credentials before setting up dependent entries.","Delete and recreate entries whose OAuth provider was removed.","After restores/downgrades, restart HA so OAuth implementations re-register."],"tags":["oauth2","config-entry","setup","application-credentials"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}