Flatten media player(s) into a group card

Hi All.

All my media players (sonos, chromecase, kodi etc) appear as separate cards.
I saw this screenshot where media player appears to be “flattened” into a group card with other entites such as lights:

Please can anyone advise what the config should look like for this?
I feel it makes for a nicer main page…

7 Likes

I would also like to know if this is possible.

1 Like

Have you tried to add it to a group?

For me it doesn´t help to put them in a group

I have this

  Music:
    - media_player.Kitchen
    - media_player.BOOM
    - media_player.livingroom
    - media_player.vardagsrum_2
    - media_player.Matsal
    - media_player.outside
    - media_player.bathroom
    - media_player.bbq
    - switch.ute_squeeze
    - switch.id9
    - switch.onkyo
    - media_player.onkyo

and they still appear as separate cards and takes a lot of space.
Would love to have it as the screenshot

Yes, same for me, too.
Adding a media player entity to a group does not lead to the screen displayed above.
the media players are all still in separate cards.
Here is a screenshot (from web) - you can see cards for living room and bedroom with some light switches, and then separate cards for media players in those rooms (groups):

This is what I get from group like:

group:
  livingroom:
    name: Living Room
    entities:
     - light.livingroomlight
     - media_player.livingroom

I know that including media player in a group card is possible as I see further evidence:

in google image search:

and in HASS documentation - which, despite showing this screenshot does not give an example config to generate it :frowning: - none of the sample configs in the group docs linked show media player.
I wonder if this feature was deprecated and the docs were not updated?

That’s the old way of showing media players and is no longer supported.

If you find an outdated screenshot in the docs, feel free to submit an updated picture.

Hey Balloob,

Thanks for your quick response confirming my suspicion about this being a deprecated feature.
Seems like a few other people feel same as I - that this can help streamline a busy UI and to show how a media_player is part of a group.
Is there the possibility to add it back as an option? Maybe via a flag against the entity in customization?
That would be fab.

BTW no criticism implied or intended. HASS is awesome :slight_smile:

I hate extra options, it makes all future development slower as we always have to test with all different features enabled/disabled etc. So don’t expect this to be added back to our official UI.

1 Like

I fully support bringing this back!! Ive got 6 sonos in the house that takes almost a full page!!!

I would also love to see the last status e.g on door senors \ motion - last opened 56 min Ago!!

2 Likes

Agree, the cards are ridiculously large. Players grouped in a single card is better (and show grouped players as a single player).

2 Likes

I also support the possibility of reducing media players to single card.

1 Like

I’m with stewface on this. I have a lot of media players in my house. Multiple sonos (which are a big grey empty card when paused), multiple chromecasts, plex, kodi etc with no way to see the grouping except by name on the main view.

As you can see, those paused Sonos devices take up quite a lot of room…

2 Likes

Same here I got about 15 media players and although it looks pretty cool that you can see what is playing on all the various chromecasts it doesn’t add an automation purpose.
I now have them all in a separate tab / page so it doesn’t take the space from the stuff I like to see. However if I want to see it it is more than fits on a page and not relevant info in most cases.

So an option to show as one line and the rest if you click on the line is preferred in my case…

2 Likes

An option, albeit a very manual one, – You could create custom sensors using the attributes from your media_players:

sensor:
  - platform: template
    sensors:
      playbar_album:
        value_template: '{{ states.media_player.playbar.attributes.media_album_name }}'
        friendly_name: 'Album Title'
        unit_of_measurement: 'Album'
      playbar_volume:
        value_template: '{{ states.media_player.playbar.attributes.volume_level | int * 100 }}%'
        friendly_name: 'Volume'
        unit_of_measurement: 'Volume'

and then add these custom sensors to a group. Then a group of groups to compact it to look more similar to the screenshots, maybe? Haven’t tested it but I think it should work.

Still not as pretty as the older screenshots but might give you what you want.

3 Likes

We should have an option for display size or have a single card with a drop down that can select different players

4 Likes

Flattening makes total sense, particularly for Sonos players which themselves can be dynamically grouped. Our players are almost exclusively always playing the same thing and so are in effect already a single player.

A small compromise would be to make the current media player window collapsible, say where it would close the album cover art. That would somewhat address the real estate issue.

5 Likes

I think that the mediaplayer is good looking but i agree, it takes up too much space. And i really want to att some of my mediaplayers to different cards together with other switches or input selects as i use for webradio.

EDIT. No need this change the way it looks today but add options and ability to move into cards.

1 Like

custom_ui does give some flexibility in terms what what exactly we want to see on the UI.
While waiting for zone2 support for media_player, i have the below DIY card for my basic usage.

Thanks @kylerw for the pointers above and here!

2 Likes

Awesome!!! Would love to see your code. How is the responsiveness? That’s one piece I haven’t had time to fix with my Custom Fan UI.