Small UI Question

Hi all, I’m new to this form and can I just say I love home assistant! :smiley: … ahem

My query is…

I have some Chromecast speakers in my setup and they each have their own entity, is there any way of sending the state information from the “all speakers” entity to display on the entities of the child speakers within the group? I find it a bit messy having an all speakers entity on display and then the very same speakers also present.

1 Like

Yes, you can certainly do that. By default Home Assistant shows everything. But you can customize by creating groups. See this page for help

This is the simple way, just display stuff you want to see.

Now if you want to get more complex, you could put each media_player into its own group and then have an automation to hide those “sub” groups based on a trigger like all speakers playing then hide all the “child” media_players and just make the master one visible.

https://home-assistant.io/docs/configuration/group_visibility/

Thank you, this is very helpful!

I’m trying to achieve this and going around in circles so if someone could chime in, that would be appreciated.

I have seven media players and I’m trying to hide one unless its state is anything but ‘off’.

I’ve grouped my Google Home into its own group

a_cast_gaming_room:
    name: "Gaming Room Google Home Test"
    entities:
    - media_player.gaming_room_home

I’ve then customised it to hide it:

group.a_cast_gaming_room:
  hidden: true

I’ve then created an automation to make it visible when its state changes from off.

- id: ID11
  alias: 'Unhide Gaming Rooom Home'
  trigger:
    - platform: state
      entity_id: media_player.gaming_room_home
      from: 'off'
  action:
    service: group.set_visibility
    entity_id: group.a_cast_gaming_room
    data:
      visible: true

But it does not work so I’m obviously missing a key point somewhere. The Google Home in the gaming room is visible on the homepage at all times.

Any clues?

1 Like

I think hidden: true will permanently hide it. Think you need to custimize such that visible is false

That’s the point, it’s not hidden.

Without seeing the full config it looks like your image shows the original device component and not the group?

I also have a media view (tab) that I’ve put the group.a_cast_gaming_room in to and it is not showing on that tab but it also does ‘not appear’ when the state changes from ‘off’ so the automation to make it visible: true is not working either.

Q: 1. If that device is in a group, why is appearing on the homepage?

@xbmcnut Try this and yes, as mentioned above, don’t set the visibility elsewhere, just have the automation do the work

- id: ID11
  alias: 'Gaming Room Home Visibility'
  trigger:
    - platform: state
      entity_id: media_player.gaming_room_home
  action:
    - service: group.set_visibility
      entity_id: group.a_cast_gaming_room
      data_template:
        visible: >-
           {% set a_cast_gaming_room = states.media_player.gaming_room_home.state %}
           {% if a_cast_gaming_room == "on" %}true
           {% else %}false
           {% endif %}

Thanks. So I need to just have the entity in it’s own group and then remove the customise option?

Added that but ‘Gaming Room Home’ still visible on home page and missing from media view (tab) even though it’s been included in that view.

media_tab:
  name: media
  view: yes
  icon: mdi:headphones
  entities:
    - group.russound
    - group.chromecast
    - group.televisions
    - group.kodi
    - group.a_cast_gaming_room

Visibility not changing in either home page or media view. Running hassio v0.62.1

Also noted that the attributes for that media player are playing, paused, idle etc. Would your automation still work if there is no ‘on’ state?

You are correct. You’ll need to modify it instead of on use playing, you can add elif for paused etc

@Jer78

Awesome, nearly there! I’ve now done this.

- id: ID11
  alias: 'Unhide Gaming Rooom Home'
  trigger:
    - platform: state
      entity_id: media_player.gaming_room_home
  action:
    - service: group.set_visibility
      entity_id: group.a_cast_gaming_room
      data_template:
        visible: >-
           {% set a_cast_gaming_room = states.media_player.gaming_room_home.state %}
           {% if a_cast_gaming_room == "off" %}false
           {% else %}true
           {% endif %}

Now the media view tab hides the media_player.gaming_room_home when it’s off only which is great! Last problem to fix is it’s still being displayed on the default view always. How do I remove it from there and leave it appearing and disappearing from the media view?

If it’s showing in the default view you must have it listed in the entities of the default view?

Can you paste your default view config?

I have no default view defined so it’s acting as a catch all. I see many requests for this to change with a pull request here. Guess I’ll have to wait and hope this makes it to a release as I do not want to define a default view.