Support styling of sub-buttons based on their entity state #844
michaelblight
started this conversation in
Feature requests
Replies: 1 comment
-
That would be nice. I would like to show the sub button red coloured only when the heating is active and not just when the entity is online. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the styles section it is possible to refer to the state of the entity. If this is used on a sub-button, it still references the main entity's state. Would it be possible to extend this to support the state of a sub-button's entity? So like in this example:
I want to be able to do something like:
The reason I want this is because I'm using sub-buttons to open/close multiple blinds, and once you click them it takes some time for them to visually show they are now open (orange background) from closed (no background). I'm aware that I could get the state by hardcoding the entity id, but I'd like to reuse the same styles between different bubble cards.
Ideally in my above example I would omit the "-1" to target the 'current' sub-button's entity, but I'm guessing this wouldn't be possible. Therefore I would duplicate the above for -1, -2, etc.
Beta Was this translation helpful? Give feedback.
All reactions