LMS trigger playlist and specific player

I have several media players running on my LMS with playlist stored. I want to be able to trigger a playlist to a certain player. I know the command required and can play a certain playlist. But somehow I am unable to pass the mac_address of the player.

I have created a rest.yaml with

lms_play_playlist:
  url: "http://XXX.XXX.XXX.XXX:9000/status.html?p0=playlist&p1=play&p2={{ playlist_name }}&player={{ player_mac }}"

My conf yaml uses input_text to store the mac

input_text:
  1v_badkamer_mac:
    name: Nest 1V Badkamer MAC
    initial: "cc:cc:7a:a4:f0:4e"

So I can call the service to start the playlist.

service: rest_command.lms_play_playlist
data:
  playlist_name: Noor
  player_mac: input_text.1v_badkamer_mac 

If I just type the mac_address (cc:cc:7a:a4:f0:4e) above the command works but with the input_text it doesn’t. Any ideas what I can do? Of course also open to other solutions :wink:

Thanks!

I use the following script in order to play a specific playlist:

  radio_playlist_wiedergeben:
    alias: "Radio - Playlist wiedergeben"
    sequence:
      - service: squeezebox.call_method
        data:
          entity_id: "{{ mediaplayer }}"
          command: 'playlist'
          parameters:
            - play
            - "{{ playlist }}"

      - service: script.radio_playlist_wiedergeben
        data:
          mediaplayer: media_player.radio_badezimmer
          playlist: 'Südtirol 1'     
3 Likes

Super, much better approach. Thanks

Thanks for this thread, the script works perfect for me…but i would like to have shuffle play for the playlist. i couldn’t get this to work for me…does anyone knows how to do this?

Like this it works good for me…but the kids don’t like shuffle, they just want their playlist in the same order ;-)…

alias: "LMS - Shuffle Play "
sequence:
  - service: media_player.shuffle_set
    data:
      entity_id: "{{ mediaplayer }}"
      shuffle: true
  - service: squeezebox.call_method
    data:
      entity_id: "{{ mediaplayer }}"
      command: playlist
      parameters:
        - play
        - "{{ playlist }}"
mode: single
icon: mdi:playlist-music

service: script.lms_shuffle_play
data:
  mediaplayer: media_player.radio_kinderzimmer
  shuffle: true
  playlist: Schlafkinder