#Question regarding expand/hiding device groups in dashboards
1 messages · Page 1 of 1 (latest)
I haven't used it myself but I think this will work for you. Consider the lovelace-expander-card. Also, see the forum thread.
I helped with something similar a while back ago. This was all done manually with the use of an input_boolean helper and a conditional card along with a layout-card, mushroom-template-card, stack-in-card, Markdown card, and some card_mod. It works well for one card but would be a hassle to deploy to several similar cards.
thanks, now I just need to figure out how I can get it to expand the entities I want
I have the following but it's not properly expanding:
type: custom:expander-card
entities:
- light.dimmable_light_centralized_dinette_chandelier
- light.dimmable_light_centralized_dinette_pots
- light.dimmable_light_centralized_dining_room_pots
- light.dimmable_light_centralized_dining_room_chandelier
You have to look at the documentation to get the proper syntax. This card isn't used to expand entities within the Entities card. It is used to show other cards when expanded.
Instead of using the title: option, I went with a Markdown card for a little more styling control.```yaml
type: custom:expander-card
child-margin-top: 0.0em
padding: 0
clear: true
title-card-button-overlay: true
title-card-clickable: true
expanded: false
title-card:
type: markdown
content: <h2><center>Light Groups</center></h2>
cards:
- type: entities
entities:- light.living_room_lights
- light.kitchen_lights
- light.bathroom_lights
- light.bedroom_lights
- light.office_lights
Added a little bit of card_mod to remove the borders and wrapped it all in a custom:stack-in-card to make it look like a single card.```yaml
type: custom:stack-in-card
cards:
- type: custom:expander-card
child-margin-top: 0.0em
padding: 0
clear: true
title-card-button-overlay: true
title-card-clickable: true
expanded: false
title-card:
type: markdown
content: <h2><center>Light Groups</center></h2>
card_mod:
style: |
ha-card {
border: none
}
cards:- type: entities
entities:- light.living_room_lights
- light.kitchen_lights
- light.bathroom_lights
- light.bedroom_lights
- light.office_lights
card_mod:
style: |
ha-card {
border: none
}
- type: entities
But, it sounds like you were wanting to expand the entities shown. So, I set the title-card: to use a vertical-stack containing the Markdown and an Entities card to show two entities. When expanded, it shows another Entities card showing the remaining entities with card_mod adjusting the top margin to make it look as if it is the same card. ```yaml
type: custom:stack-in-card
cards:
- type: custom:expander-card
child-margin-top: 0.0em
padding: 0
clear: true
title-card-button-overlay: true
title-card-clickable: true
expanded: false
title-card:
type: vertical-stack
cards:
- type: markdown
content: <h2><center>Light Groups</center></h2>
card_mod:
style: |
ha-card {
border: none
}
- type: entities
entities:
- light.living_room_lights
- light.kitchen_lights
card_mod:
style: |
ha-card {
border: none;
margin-top: -25px
}
cards:- type: entities
entities:- light.bathroom_lights
- light.bedroom_lights
- light.office_lights
card_mod:
style: |
ha-card {
border: none;
margin-top: -25px
}
```EDIT: Addedmargin-top: -25pxto the first Entities card to close the gap a little bit.
- type: entities
i'm getting the error "Custom element doesn't exist: stack-in-card."
I have card mod installed from hacs though
You'll have to add stack-in-card. Follow the link above to get the custom repository to add to HACS. After you install it, you'll need to refresh your browser.
yeah sorry, i'm so stupiiiiiiiiid 
@hazy fiber heya, thanks again for everything. One last question before I close this: how do I add nest controllers to this? i have two nest thermostats and want to control them but have them expand to both