Media repeat not working in automation

I am trying to create a simple automation triggered by a button, to clear the sonos queue, set the volume, play a playlist and set it to repeat. It all works, except the repeat.

alias: Bedtime Button
description: ""
triggers:
  - domain: mqtt
    device_id: 54ed6d96131d81dedd0f27e5e529f29b
    type: action
    subtype: single
    trigger: device
conditions: []
actions:
  - action: media_player.clear_playlist
    metadata: {}
    data: {}
    target:
      device_id: 16a59a2e07c898bbd11ff956889af992
  - action: media_player.volume_set
    metadata: {}
    data:
      volume_level: 0.15
    target:
      device_id: 16a59a2e07c898bbd11ff956889af992
  - action: music_assistant.play_media
    metadata: {}
    data:
      media_type: playlist
      enqueue: play
      media_id: Bedtime
    target:
      device_id: 1eeca358c95a20c099ffb48977d0fc2b
  - action: media_player.repeat_set
    metadata: {}
    data:
      repeat: all
    target:
      device_id: 16a59a2e07c898bbd11ff956889af992
mode: single

The repeat action seems pretty simple, but I am not sure why it’s not working. Anyone else run into this problem?

Hi

I don’t know for certain, but that is likely one of those functions that are specific to the device you are playing on.
You should perhaps include what the device_id actually is using integration wise.

Also I noticed that the repeat_set docs do not mention device_id but do mention entity_id. In the docs if something is not mentioned generally it’s not available but this is not always the case. Just an observation on my part.
Media player - Home Assistant.