Skip to content

color stops not working #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lgwapnitsky opened this issue Jun 14, 2022 · 3 comments
Open

color stops not working #54

lgwapnitsky opened this issue Jun 14, 2022 · 3 comments

Comments

@lgwapnitsky
Copy link

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
Copy link

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
Copy link

Symbiot78 commented Jun 27, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants