#Music Assistant automation

1 messages · Page 1 of 1 (latest)

frank saffron
#

Im trying to get music assistant to play files stored on my HA Green. i have the files in a playlist and they play fine when i trigger the automation, but the playlist will always start at the same song and never shuffle. how do i get it to shuffle the playlist so it always starts at a different song and shuffles the playlist?

vernal hearth
#

service: media_player.shuffle_set
target:
  entity_id: media_player.your_player

  shuffle: true

frank saffron
#

ok, i have no clue how to impliment any of this

#

where ams i selecing 'service'?

vernal hearth
#
alias: Play shuffled playlist on MA
mode: single
trigger:
  - platform: state
    entity_id: input_boolean.good_morning   # or whatever your trigger is
    to: "on"

action:
  - service: media_player.shuffle_set
    target:
      entity_id: media_player.your_player
    
      shuffle: true

  - service: mass.play_media
    target:
      entity_id: media_player.your_player
    
      media_content_id: "Your Playlist Name or URL"
      media_content_type: playlist
      enqueue: replace      # or 'play', 'add' etc.

Run this from an automation

#

Gemini / Claude / GPT can really help you out.

frank saffron
#

tried gemini with changing the wake word and it gave me 100% worthless code

#

how do i get the entity_id of my media player (a voice PE)?

frank saffron
#

says "extra keys not allowed @ data [actions] [target] [shuffle]"

#

wont save

vernal hearth
#

Or esphome

#

But you need the Music Assistant media player.

frank saffron
#

i found it, but the code you gave me cannot be saved or even triggered