Local music (Plex) in a playlist --> play one HomePod

As stated in the title i have my music in flex organized (Playlist) and would like to play them on my audio devices like HomePods.

How do i do this?

DLNA does not show playlists from plex.

I use this YAML to play from my Plex on my Google Home Minis:

service: media_player.play_media
data_template:
  entity_id: media_player.<media player entity name>
  media_content_type: playlist
  media_content_id: >-
    plex://{"library_name": "<library name>", "playlist_name": "<playlist name>", "shuffle": "1"}

Just put in your entity, library name, and playlist name. (you can set shuffle to 0 if you want also)

Link to documentation: Google Cast - Home Assistant

Thank you.

I’ve got two questions. Selection of playlists via GUI is not possible?
How do i add the service call inside to a button in Lovelace dashboard?

Not this way, as a GUI is not supported with the data_template and the Plex integration doesn’t pull playlist data into HA afaik.

To add the service call to a button, I would create an automation that sets up the casting in the data_template then have the dashboard button trigger that automation.

I’m getting the following error:

Any ideas?

I’ve never used a homeassistant.components entity before, is that like trying to cast to the HA app running on the apple TV? If you have the Plex app installed, and it’s viewable as a player in HA, you might try casting to that.
Beyond that I am not sure, sorry. I’ve only ever cast to Google Home Minis and don’t have any Apply devices…