{"record":{"id":"d297c4745aeaf69b","repo":"home-assistant/core","slug":"action-not-permitted-for-content","errorCode":"ACTION_NOT_PERMITTED_FOR_CONTENT","errorMessage":"{entity} did not return the current media position.","messagePattern":"(.+?) did not return the current media position\\.","errorType":"exception","errorClass":"AlexaVideoActionNotPermittedForContentError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/alexa/handlers.py","lineNumber":1804,"sourceCode":"\n    return response\n\n\n@HANDLERS.register((\"Alexa.SeekController\", \"AdjustSeekPosition\"))\nasync def async_api_seek(\n    hass: ha.HomeAssistant,\n    config: AbstractConfig,\n    directive: AlexaDirective,\n    context: ha.Context,\n) -> AlexaResponse:\n    \"\"\"Process a seek request.\"\"\"\n    entity = directive.entity\n    position_delta = int(directive.payload[\"deltaPositionMilliseconds\"])\n\n    current_position = entity.attributes.get(media_player.ATTR_MEDIA_POSITION)\n    if not current_position:\n        msg = f\"{entity} did not return the current media position.\"\n        raise AlexaVideoActionNotPermittedForContentError(msg)\n\n    seek_position = max(int(current_position) + int(position_delta / 1000), 0)\n\n    media_duration = entity.attributes.get(media_player.ATTR_MEDIA_DURATION)\n    if media_duration and 0 < int(media_duration) < seek_position:\n        seek_position = media_duration\n\n    data: dict[str, Any] = {\n        ATTR_ENTITY_ID: entity.entity_id,\n        media_player.ATTR_MEDIA_SEEK_POSITION: seek_position,\n    }\n\n    await hass.services.async_call(\n        MEDIA_PLAYER_DOMAIN,\n        media_player.SERVICE_MEDIA_SEEK,\n        data,\n        blocking=False,\n        context=context,","sourceCodeStart":1786,"sourceCodeEnd":1822,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/alexa/handlers.py#L1786-L1822","documentation":"Raised by the Alexa.SeekController handler: a relative seek needs the media player's current media position (media_position attribute) to compute the target, and it is missing or 0/None. Returned to Alexa as ACTION_NOT_PERMITTED_FOR_CONTENT.","triggerScenarios":"'Alexa, skip forward 30 seconds' style AdjustPlaybackPosition directives when the media player state has no media_position attribute.","commonSituations":"Media is not actively playing (no position tracked); integration does not report media_position; stream/live content where position is undefined.","solutions":["Start playback so the player reports media_position, then seek","Fix the integration/device to expose media_position (and update media_position_updated_at)","Use absolute seek via the media_player.seek service instead of a delta"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"state = hass.states.get(entity_id)\nif not (state and state.attributes.get('media_position')):\n    _LOGGER.warning('%s has no media_position; cannot seek', entity_id)\n    return","typeGuard":"def player_reports_position(state) -> bool:\n    return bool(state and state.attributes.get('media_position'))","tryCatchPattern":"Catch AlexaVideoActionNotPermittedForContentError and inform the user seeking is unavailable for this content.","preventionTips":["Only expose SeekController for players that report media_position","Ensure media_position_updated_at is also set when implementing players"],"tags":["alexa","smart-home","media-player","seek"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}