custom-cards / bar-card

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

Enhancement: gradient for severity options #100

Open zen2 opened 4 years ago

zen2 commented 4 years ago

I suppose that like me a lot of users create a gradient using a from/to/color list in severity options. It will be really cool to do not calculate the gradient and make the list manually and to have an option to calculate the gradient. That could be represented like this:

severity:
  - from: -5
    color-from: blue
    to: 24
    color-to: green
    color-step: 1
  - from: 24
    color-from: green
    to: 40
    color-to: red
    color-step: 1

Note: How to calculate gradient values