Skip to content
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

Custom icon colors outside 0-100 range not working #735

Open
GeoffWy opened this issue Aug 20, 2024 · 0 comments
Open

Custom icon colors outside 0-100 range not working #735

GeoffWy opened this issue Aug 20, 2024 · 0 comments

Comments

@GeoffWy
Copy link

GeoffWy commented Aug 20, 2024

First off - great card and very useful, but I am having trouble using the card to display LQI over the range 0-250. I am setting color steps as:

colors:
  steps:
    - color: '#ff0000'
      value: 0
    - color: '#aa5500'
      value: 85
    - color: '#55aa00'
      value: 170
    - color: '#00ff00'
      value: 255
  gradient: true

This should set colors ranging from red at 0 to green at 255, but the resulting output sets all values above 100 to the default color. I had understood the fix to this problem was supposed to allocate over the whole range.

Full card code for reference:

type: custom:battery-state-card
title: LQI
secondary_info: '{last_changed}'
icon: mdi:eye
filter:
  include:
    - name: entity_id
      value: sensor.*lqi*
unit: ' '
sort:
  by: state
collapse: 12
bulk_rename:
  - from: LQI
value_override: '{state|equals(unavailable,0)}'
colors:
  steps:
    - color: '#ff0000'
      value: 0
    - color: '#aa5500'
      value: 85
    - color: '#55aa00'
      value: 170
    - color: '#00ff00'
      value: 255
  gradient: true

Originally posted by @maxwroc in #599 (comment)

@GeoffWy GeoffWy changed the title Custom icon colors outside 0-100 range not working hold on - still editing ! Custom icon colors outside 0-100 range not working Aug 20, 2024
@GeoffWy GeoffWy changed the title hold on - still editing ! Custom icon colors outside 0-100 range not working Custom icon colors outside 0-100 range not working Aug 20, 2024
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

1 participant