custom-cards / bar-card

Customizable Animated Bar card for Home Assistant Lovelace
MIT License
364 stars 52 forks source link

[Feature request] display complementary value #102

Closed amaximus closed 4 years ago

amaximus commented 4 years ago

I'd like to request a feature for displaying complementary to max value while the bar uses the sensor state value.

Let's take the car oil change as example:

The bar-card (min:0, max: 20000) should display the bar as 53000-40000 (13000; this would be provided by the sensor) while the value displayed should be the complementary to max, 20000-13000 (7000).

So the complementary value to display should be: max - states.sensor.example.state

BTW thanks for this great card.

Gluwc commented 4 years ago

Added in 3.2.0, thanks for the PR!