custom-cards / bar-card

Customizable Animated Bar card for Home Assistant Lovelace
MIT License
378 stars 54 forks source link

Request - Change colour based on state #72

Closed Shaun-Harrison closed 4 years ago

Shaun-Harrison commented 4 years ago

Hi

Wondering if its possible to have the bar colour change based on a state?

So I'm using the bar to display a phones battery percentage, would be nice to have it turn a certain colour if the phone is on charge based on a sensor state

Or at least, if the value is increasing instead of decreasing its a certain colour?

Thank you!

Gluwc commented 4 years ago

This isn't directly possible with the card config, but you can probably change the color value of the bar using config-template-card.

Shaun-Harrison commented 4 years ago

No problem, will check this out, thank you!