Flatten media player(s) into a group card

That’s because it’s mdi not mid: … icon: mdi:your_icon

Sure thing! Damn.

But what about the template > icon_template part?
(In a package)

sensor:
  - platform: template
    sensors:
      media_state_tv:
        value_template: '{{ states("media_player.samsung_tv_remote") }}'
        icon_template: >-
          {% if is_state('media_player.samsung_tv_remote', 'on') %}
            mdi:cast
          {% elif is_state('media_player.samsung_tv_remote', 'unknown') %}
            mdi:tv
          {% else %}
            mdi:tv
          {% endif %}

The TV-state sensor is showing up, and the text is OK too, but no icon shows up:
image

As far I can see the tv icon doesn’t exist so wouldn’t be displayed :frowning:

It’s an alternative-name, but i will give mdi:television a try.

That should work or television-classic.

1 Like

I created an index of home automation related icons you can use.

You can access it immediately here:
https://cdn.rawgit.com/james-fry/home-assistant-mdi/efd95d7a/home-assistant-mdi.html

Or can also install it as a panel iframe - instructions here:

3 Likes

M8. It’s like you are looking into my change-log (o: I actually added it a few hours ago.

@keithh666 - Thanks for your input. I actually think that i have used alternative names in the past? But… Well, now it’s working. What a waste of time :smiley: (Debugging for more than a few hours).

1 Like

Any luck making this happen?

EDIT: Looks like the solution is the universal media player platform.

2 Likes

Why can’t this just be reverted? It seems nobody likes the current ui for media players.

2 Likes

@eddi89 made a Custom UI Mini media player. Still in beta, though, but give it a try if you wish and help him work out the bugs :wink:

2 Likes

Some heroes don’t wear capes.

You can totally do this with the new Lovelace UI. When you list media_player entities, it does this by default. You need to create a specific “media-control” card to see it the way you do in the current UI.

https://developers.home-assistant.io/docs/en/lovelace_card_types.html

2 Likes

Resurrecting an old post, but where do I put the the “custom_ui/state-card-custom_source.html” part of @Airpal’s code? Being from 2017 I’m sure it will need some updates and customization to fit my own Denon integration, but knowing where it goes is step 1 for now.

Thanks!