2022.3: Select and play media

I think the main requirement is that it can stream HLS, so the attribute frontend_stream_type should be hls.

I have two MusicCast devices which show up OK, but I canā€™t select them as renderers in the media browser. My Chromecasts show up, but not the MusicCast devices. Should this work?

1 Like

When ā€œplayingā€ a (Lovelace) dashboard to a google-cast device, is there a way to use a theme and or resolution? I successfully cast a dashboard/view to my Sony Bravia tv (google cast entity).

I have a separate set of dashboards for my cast devices, and you can set themes there.

1 Like

Hello,

Iā€™m a little late to the party on the play media functionality but I finally got deeper into it and I have a clarifying question. I understand you can basically make home assistant play anything you want. But what if I donā€™t know what I want it to be or I donā€™t want it to be the same thing?

Is there a way for me to randomize or shuffle the media selections? I read through the docs twice and I looked every where I could think of in the software. Itā€™s perfectly understandable if that wasnā€™t a phase 1 item, I just want to make sure Iā€™m not missing some obvious way to do this before I submit a feature request.

Given a trigger, Iā€™d like to be able to randomize selections:
At dinner time, pick one of ā€˜theseā€™ jazz playlists
When I come home, play one of ā€˜theseā€™ radio stations
On Fridays, play one of ā€˜theseā€™ albums

HA already has access to my SONOS playlists and favorites, I just canā€™t figure out how to shuffle playlists/stations for a selection.

Note: Iā€™m not trying to shuffle every song between lists. Just trying to get it to where itā€™s not playing the same playlist every time the automation fires.

You could tinker around with that:

1 Like

I did try something similar to this and I was getting errors so I figured I was way off base. It looks like I just had a few incorrect details. Iā€™ll give it another shot with this example, thank you.

1 Like

I got it. I was using the wrong trigger:

service: media_player.select_source
data:
  source: {{ ['Soft Jazz Sax', 'Disco Essentials', 'Ladies First: Female MCs'] | random}}
target:
  device_id: 44c16384ae6ac4d727a6f458c9ffbd85
2 Likes

Hi, can someone help me:

I cast with

action:
  - service: media_player.play_media
    target:
      entity_id: media_player.nesthub_google_kueche
    data:
      media_content_id: _default_
      media_content_type: lovelace

But what is the service to stop ā€œplay_mediaā€? I need something like ā€œHey google, stopā€ā€¦

Thx a lot :slight_smile:

sorry my fault.
media_player.turn_off is the answer.

I tried media_stopā€¦

thx

Same problem here, did you find any solution?

No. I never found a solution. My understanding is that you need a Chrome/Google-cast compatible streaming device. LG uses WebOS and a slightly off-spec (from Chrome) casting protocol.

Is Spotify supposed to be in the media. For some reason I can not get this to work. I am a premium Spotify user.

@jonathanrob I have the same frigate media issue as you, did you solve it?

I didnā€™t find a solution yet. Iā€™m still on 2022.6.

Just found this topic when trying to find out why I cannot play media in my LG TV, I guess the situation is still the same and no luck so far, right?

Right. No fix, nor have I seen any discussion about a proposed fix.
ā€¦ of course I canā€™t be certain :slightly_smiling_face:

Hey! Did you ever find out how to solve this issue?

Iā€™m wondering how to select a complete album or multiple items to play like show in the screenshot of this announcement:

I donā€™t get that, I only get to select a single file.