Play playlist from Home Assistant


I have really been struggling with this but I would like to be able to play a playlist as part of an automation or scene but I am not able to get it to work. I have both plex and logitech media server integrations working I am however unable to call a service to get the players to start playing. I am hoping someone has a working example they could share or point my in the right direction.

According to documentation we can use media_player.play_media to play media on a ‘ connected ’ client, using the following detail:

  • entity_id - media_player.theater_plex
  • media_content_id - { \“playlist_name\” : \“The Best of Disco\” \“shuffle\”: \“0\” }
  • media_content_type - PLAYLIST

However even though I don’t have errors nothing happens.

I also tried with a logitech media server and home assistant doesn’t reports error but looking at the logs for the logitech media server it show request not dispatch-able.

1 Like

Here’s how I just solved the same problem.

First, create a rest.yaml file containing:

    url: "{{ playlist_name }}"

(change the IP address of your server)

and include it in your configuration.yaml:

rest_command: !include rest.yaml

Then, restart home assistant, and test it using developer tools like so:


…and call it from a script like so:

service: rest_command.lms_play_playlist
  playlist_name: bfm

or, of course, using the UI editor:

Note that the playlist name seems to be case-sensitive, and don’t include the .m3u filename extension.

Hope that helps! It might also be possible using the media_player.play_media command too, I haven’t experimented.

1 Like