Closed jabronimus closed 1 day ago
This is exactly what is currently not possible and for this you would have to control the HA backend. A good place to start could be the mushroom card. That's where it was implemented.
If anyone has experience with this, I would be happy if someone could contribute this feature.
Maybe it is also possible to set the status via card mod. Haven't tried it myself yet.
Yeah, I mean I could use a conditional card, duplicate the expander card info with one version being "expanded: true" and one version being "expanded: false", and set the conditions in the conditional card ... but that's like ... a LOT of work.
A decluttering template might also be an option.
but that's like ... a LOT of work.
It depends, i'am using the YAML Mode in HA for my UI. There you can move the the complete expander card into one file and then just reuse it in your conditional card with !include. I do this a lot to have only one single place when I have cards in more than one places in my UI.
e.g.
- type: conditional
condtions:
- condition: state
entity: sensor.waschmaschine
state: "on"
card:
- type: custom:expander-card
expanded: true
cards: !include my-expander.yaml
- type: conditional
condtions:
- condition: state
entity: sensor.waschmaschine
state: "off"
card:
- type: custom:expander-card
expanded: false
cards: !include my-expander.yaml
That's what i ended up doing, so i'm going to consider this closed
From my point of view it can remain open, the feature definitely makes sense to offer template support :)
This is a great card, so thank you for making this!
The feature I would like is the ability to "template" the "expanded" state. As an example, instead of
expanded: true
orexpanded: false
, I would like to be able to do something like the following: