Need help re on/off state coloring #512
-
So I have two aircons using bubble card and I'd like the color stays just like the screenshot when it's "Off" and when it is "On" (It could be heating or cooling) and I'd like it to pick the default "on" color from the theme just like the "Fan" entity. Is it something that I can do using style please? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
Hi! Is your fan a light entity? Because this color is only for light entities, your fan card should be blue on my theme. |
Beta Was this translation helpful? Give feedback.
-
.bubble-button-card-container { Hi there! A follow up question here, how can I change the color of an icon? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Yes, you can also change the color based on an attribute this way, by replacing
hass.states['fan.your_entity'].state === 'state 1'
withhass.states['fan.your_entity'].attributes.your_attribute === 'attribute state'
.But I will cover all of this in the new documentation, I still have a lot of work to do on that point. I really want to make everything clear and easy to understand.
Edit: You made a mistake, it's like this: