{"record":{"id":"aeaafbad565c8904","repo":"home-assistant/core","slug":"no-such-endpoint","errorCode":"NO_SUCH_ENDPOINT","errorMessage":"The endpoint {endpoint_id} does not exist","messagePattern":"The endpoint (.+?) does not exist","errorType":"exception","errorClass":"AlexaInvalidEndpointError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/alexa/state_report.py","lineNumber":117,"sourceCode":"\n        Sets these attributes when self.has_endpoint is True:\n\n        - entity\n        - entity_id\n        - endpoint\n        - instance (when header includes instance property)\n\n        Behavior when self.has_endpoint is False is undefined.\n\n        Will raise AlexaInvalidEndpointError if the endpoint in the request is\n        malformed or nonexistent.\n        \"\"\"\n        _endpoint_id: str = self._directive[API_ENDPOINT][\"endpointId\"]\n        self.entity_id = _endpoint_id.replace(\"#\", \".\")\n\n        entity: State | None = hass.states.get(self.entity_id)\n        if not entity or not config.should_expose(self.entity_id):\n            raise AlexaInvalidEndpointError(_endpoint_id)\n        self.entity = entity\n\n        self.endpoint = ENTITY_ADAPTERS[self.entity.domain](hass, config, self.entity)\n        if \"instance\" in self._directive[API_HEADER]:\n            self.instance = self._directive[API_HEADER][\"instance\"]\n\n    def response(\n        self,\n        name: str = \"Response\",\n        namespace: str = \"Alexa\",\n        payload: dict[str, Any] | None = None,\n    ) -> AlexaResponse:\n        \"\"\"Create an API formatted response.\n\n        Async friendly.\n        \"\"\"\n        response = AlexaResponse(name, namespace, payload)\n","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/alexa/state_report.py#L99-L135","documentation":"Raised by AlexaDirective.load_entity (state_report.py): the directive's endpointId is converted to an entity_id, and if hass.states.get returns no state or config.should_expose(entity_id) is false, AlexaInvalidEndpointError is raised with NO_SUCH_ENDPOINT. It also doubles as the not-exposed error.","triggerScenarios":"Alexa sends a directive for an endpoint that was deleted, renamed, is not exposed via should_expose filters (entity list / include/exclude config), or whose entity_id no longer matches the cached endpointId.","commonSituations":"Device removed or renamed after Alexa discovery; entity excluded in cloud smart_home filter_config; stale Alexa cache; entity_id changed via the UI.","solutions":["Expose the entity in the Alexa/entity cloud filters and run 'Alexa, discover devices'","If the entity was renamed, update or re-discover so Alexa maps to the new endpointId","Confirm the entity exists via hass.states.get(entity_id) and should_expose returns true"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"state = hass.states.get(entity_id)\nif state is None or not config.should_expose(entity_id):\n    raise ValueError(f'{entity_id} missing or not exposed; run Alexa rediscovery')","typeGuard":"def endpoint_available(hass, config, entity_id: str) -> bool:\n    return hass.states.get(entity_id) is not None and config.should_expose(entity_id)","tryCatchPattern":"Catch AlexaInvalidEndpointError (NO_SUCH_ENDPOINT), verify the entity still exists and is exposed, then trigger rediscovery.","preventionTips":["Check hass.states.get and should_expose before sending directives","Run 'Alexa, discover devices' after renaming or removing entities","Keep cloud entity filters aligned with the entities Alexa knows"],"tags":["alexa","smart-home","endpoint","discovery","entity-exposure"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}