{"record":{"id":"971d2dd4970c2f6a","repo":"home-assistant/core","slug":"config-entry-not-found","errorCode":"config_entry_not_found","errorMessage":"Config entry not found: {device_id}","messagePattern":"Config entry not found: (.+?)","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/alexa_devices/services.py","lineNumber":70,"sourceCode":"        raise ServiceValidationError(\n            translation_domain=DOMAIN,\n            translation_key=\"invalid_device_id\",\n            translation_placeholders={\"device_id\": device_id},\n        )\n\n    for entry_id in device_entry.config_entries:\n        if (entry := call.hass.config_entries.async_get_entry(entry_id)) is None:\n            continue\n        if entry.domain == DOMAIN:\n            if entry.state is not ConfigEntryState.LOADED:\n                raise ServiceValidationError(\n                    translation_domain=DOMAIN,\n                    translation_key=\"entry_not_loaded\",\n                    translation_placeholders={\"entry\": entry.title},\n                )\n            return (device_entry, entry)\n\n    raise ServiceValidationError(\n        translation_domain=DOMAIN,\n        translation_key=\"config_entry_not_found\",\n        translation_placeholders={\"device_id\": device_id},\n    )\n\n\nasync def _async_execute_action(call: ServiceCall, attribute: str) -> None:\n    \"\"\"Execute action on the device.\"\"\"\n    device, config_entry = async_get_entry_id_for_service_call(call)\n    assert device.serial_number\n    value: str = call.data[attribute]\n\n    coordinator = config_entry.runtime_data\n\n    if attribute == ATTR_SOUND:\n        if value not in SOUNDS_LIST:\n            raise ServiceValidationError(\n                translation_domain=DOMAIN,","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/alexa_devices/services.py#L52-L88","documentation":"ServiceValidationError with translation key alexa_devices/config_entry_not_found, raised when the device registry entry exists but none of its config_entries resolve to an alexa_devices entry — i.e. the device_id is valid but not an Alexa device managed by this integration.","triggerScenarios":"Calling an alexa_devices service with the device_id of a device that belongs to a different integration (e.g. a Sonos or Hue device), or an Alexa device whose alexa_devices entry was removed while the device registry entry lingered.","commonSituations":"Users pasting the wrong device's ID, devices duplicated across integrations (e.g. Echo exposed by both alexa_devices and a Matter/AVR integration), or orphaned registry entries after integration removal.","solutions":["Verify the device_id belongs to a device provided by the alexa_devices integration (check the device page's 'Provided by' link)","Pick the device through the UI service selector instead of hand-typing IDs","Delete orphaned device registry entries left over from removed integrations","Re-add the Alexa account if its devices lost their config entry association"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"device_entry = dr.async_get(hass).async_get(device_id, include_child_devices=False)\nentries = [hass.config_entries.async_get_entry(e) for e in (device_entry.config_entries if device_entry else [])]\nhas_alexa = any(e and e.domain == DOMAIN for e in entries)\nif not has_alexa:\n    _LOGGER.warning(\"device_id %s is not an alexa_devices device\", device_id)\n    return","typeGuard":null,"tryCatchPattern":"try:\n    await hass.services.async_call(DOMAIN, SERVICE, service_data, blocking=True)\nexcept ServiceValidationError as err:\n    if err.translation_key == \"config_entry_not_found\":\n        _LOGGER.warning(\"Device %s not managed by alexa_devices\", device_id)","preventionTips":["Check the 'Provided by' label on the device page before copying its ID","Use the integration's own device picker in service calls","Clean up orphaned registry entries after removing integrations"],"tags":["alexa-devices","service-call","device-registry","user-input","homeassistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}