Hi all, I’m new to this form and can I just say I love home assistant! … 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
Jer78
(Jeremy Percival)
September 7, 2017, 7:52pm
2
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!
xbmcnut
(xbmcnut)
February 9, 2018, 1:14am
4
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
xbmcnut
(xbmcnut)
February 9, 2018, 2:23am
6
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?
xbmcnut
(xbmcnut)
February 9, 2018, 2:33am
8
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?
Jer78
(Jeremy Percival)
February 9, 2018, 2:34am
9
@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 %}
xbmcnut
(xbmcnut)
February 9, 2018, 2:40am
10
Thanks. So I need to just have the entity in it’s own group and then remove the customise option?
xbmcnut
(xbmcnut)
February 9, 2018, 2:50am
11
Jer78:
Try this
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
xbmcnut
(xbmcnut)
February 9, 2018, 2:55am
12
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?
Jer78
(Jeremy Percival)
February 9, 2018, 2:57am
13
You are correct. You’ll need to modify it instead of on use playing, you can add elif for paused etc
xbmcnut
(xbmcnut)
February 9, 2018, 3:03am
14
@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?
xbmcnut
(xbmcnut)
February 9, 2018, 3:53am
16
andrewdolphin:
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.
home-assistant:dev
← PhracturedBlue:no_home
opened 03:07AM - 12 Jan 18 UTC
## Description:
This adds the option to hide entities in a view from the defaul… t home page without needing to use a default_view.
This is preferable to using a default_view, as it guarantees that every (non hidden) entity is displayed on at least one page. If the default_view is used, then the list of entities on the home page needs to be explicitly managed, and badges cannot be shown (?)
By using `hide_on_home=yes` with `view: yes` items on a tab can be automatically hidden from the default home page.
This has been discussed here:
https://community.home-assistant.io/t/hiding-a-group-from-default-view/8733/15
**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Frontend code: https://github.com/home-assistant/home-assistant-polymer/pull/796
## Example entry for `configuration.yaml` (if applicable):
```yaml
group:
group1:
name: group1
view: yes
hide_on_home: yes
entities:
- sensor.only_on_tab
```
## Checklist:
- [x] The code change is tested and works locally.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)
If the code does not interact with devices:
- [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**
- [ ] Tests have been added to verify that the new code works.