dylandoamaral / uptime-card

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

Numeric Range Visualization #163

Closed awilliams84 closed 10 months ago

awilliams84 commented 1 year ago

I am trying to display a sensor to show the range of power throughout the day. This usually returns a numeric value 190-230. But right now its showing as "unknown" and I see no value in the footer.

type: custom:uptime-card
entity: sensor.upstairs_hallway_lamp_rms_voltage_2
icon: mdi:lightning-bolt
title_template: House Power
hours_to_show: 168
status_adaptive_color: true
color_thresholds:
  - value: 200
    color: red
  - value: 205
    color: yellow
  - value: 210
    color: green
show:
  footer: true
average_template: '[[[ return variables.current; ]]]% uptime'
dylandoamaral commented 1 year ago

Look at https://github.com/dylandoamaral/uptime-card#color-thresholds to see how it works. With your configuration, value from 210 to 230 would be ignored.