dylandoamaral / uptime-card

Minimalistic uptime card for Home Assistant Lovelace UI
266 stars 11 forks source link

Color thresholds buggy #66

Closed agneevX closed 3 years ago

agneevX commented 3 years ago

Hi!

Color thresholds seems buggy...

  1. Historical data is showing different colors randomly
  2. I'm seeing an undefined color (white), also randomly
color_thresholds:
  - value: 95
    color: '#C66445'
  - value: 97
    color: '#C6B145'
  - value: 99
    color: '#45C669'

https://user-images.githubusercontent.com/19761269/115549540-6106ec00-a2c6-11eb-859a-6513efe57af1.mov

agneevX commented 3 years ago

Ok, so this seems to be an issue for values above the highest limit specified:

Expand YAML code ```yaml entity: binary_sensor.cloudflare_dns_ping type: 'custom:uptime-card' name: Internet icon: 'mdi:ethernet-cable' hours_to_show: 1 ko_icon: 'mdi:ethernet-cable-off' title_adaptive_color: true status_adaptive_color: true icon_adaptive_color: true color_thresholds: - value: 95 color: '#C66445' - value: 97 color: '#C6B145' - value: 99 color: '#45C669' tap_action: action: more-info haptic: light bar: spacing: 4 amount: 36 height: 22 round: 5 alias: ok: Online ko: Offline ```

A workaround seems to be to add another color_threshold for the max value here, i.e. 100.

dylandoamaral commented 3 years ago

Are you using v0.5.0 ?

agneevX commented 3 years ago

Yes, I am.

dylandoamaral commented 3 years ago

I will close the issue, according to the readme, the feature is working as expected.