piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: Collapsible group card

KTibow opened this issue · comments

Is your feature request related to a problem?

Right now, if I want to have a toggle for a light group but also be able to control the individual lights, I have to either make separate cards or give up on controlling the different lights.

Describe the solution you'd like

Cards that can expand into the different entities inside of the group.

Describe alternatives you've considered

Add a separate card for each light, or use browser-mod to show a card in a popup on hold/double tap

Additional context

[Poor quality] mockup:
image
image
fan-mockup-collapsed
fan-mockup-expanded
For the light group from the Helpers tab, you would use the entity_id field:
image

Would love this!

Just want to add a +1 to this request. I'm currently doing it through conditional cards but that's a complex solution for what seems like a frequent use case.

@piitaya could you transfer this issue into a discussion (if you feel it would help)?

It would be good to not only check the group entity but if it's a zha group for example where the group entity as of now does not have child entities to provide an alternative (config option) which would be to check the area of the group. That would provide the entities in the same area provided the user added them.

Hopefully soon zha group entities will have child entities exposed in the frontend the same way ha group entities are.

Would be great for this to work with template cards as well. Perhaps it's a config option added to multiple cards to allow multiple cards to have this functionality. Either a collapsible drop-down or a pop-up.

These are template cards generated by auto-entities it would be great to tap on them or have some ability to pull up the child entities using their corresponding area as they are also all zha groups.

Screenshot_20220823-180541_Home Assistant

Since all my cards are build this way right now, this missing feature is what keeps me of away from switching to mushroom cards.
Maybe the code from here can help you implementing it?

image

I've implemented it with help of the custom:fold-entity-row. However, it doesn't look very good, destroys the mushroom philosophy since you have to use YAML and the card isn't meant to be used like that...

It's a nice trick to use it right now, but doesn't solve the request that this should be implemented directly into mushroom.

type: custom:fold-entity-row
open: false
head:
  type: custom:mushroom-light-card
  layout: horizontal
  show_brightness_control: true
  use_light_color: true
  show_color_control: true
  entity: light.j_ambiente
entities:
  - type: custom:mushroom-light-card
    layout: horizontal
    show_brightness_control: true
    use_light_color: true
    show_color_control: true
    entity: light.meross_bulb_2
  - type: custom:mushroom-light-card
    layout: horizontal
    show_brightness_control: true
    use_light_color: true
    show_color_control: true
    entity: light.meross_bulb_1
  - type: custom:mushroom-light-card
    layout: horizontal
    show_brightness_control: true
    use_light_color: true
    show_color_control: true
    entity: light.led_controller_1
  - type: custom:mushroom-light-card
    layout: horizontal
    show_brightness_control: true
    use_light_color: true
    show_color_control: true
    entity: light.led_controller_2

image
image

Just want to add my +1 to this.
Would be awesome to have this, as it would make life a lot easier