AmoebeLabs / flex-horseshoe-card

Flexible Horseshoe card for Home Assistant Lovelace UI. A card with a flexible layout, a horseshoe-like donut graph, multiple entities or attributes, graphics and animations!
259 stars 42 forks source link

color stops not working #54

Open lgwapnitsky opened 2 years ago

lgwapnitsky commented 2 years ago

My current code is as follows:

type: custom:flex-horseshoe-card
entities:
  - entity: sensor.air_quality_index
    name: Air Quality
    attribute: state
    decimals: 1
show:
  horseshoestyle: colorstopgradient
layout:
  states:
    - id: 0
      entity_index: 0
      xpos: 50
      ypos: 60
  //  areas: null
  //    - id: 0
  //      entity_index: 0
  //      xpos: 50
  //      ypos: 35
  names:
    - id: 0
      entity_index: 0
      xpos: 50
      ypos: 35
horseshoe_scale:
  min: 0
  max: 300
color_stops:
  '0': '#24E79F'
  '20': '#FEC428'
  '50': '#FD702F'
  '100': '#F42254'
  '150': '#C522A7'
  '200': '#9717FB'

but the color stays light blue. When I try to remove the single-quotes in the editor, HA keeps adding them back in. That may be the issue, but not sure how to resolve.

Thank you

Symbiot78 commented 1 year ago

same here. with colorstop and colorstopgradient it does not adhere to the color_stops but just uses the actual stop color. meaning the gradient isn't in play at all.

Symbiot78 commented 1 year ago

for instance I have set colorstopgradient and these values:

        color_stops:
          0: 'blue'
          17: 'yellow'
          26: 'green'
          28: 'orange'
          40: 'red'

I would expect the scale.. if the entity value was 27 to start in blue.. gradientify to yellow then green and hints of orange. but the result is more.. lime-green

LinkerHoden commented 3 weeks ago

I do have the same problem. Colorstopgradient is unfortunately not working.