wilsto / pool-monitor-card

The "Pool Monitor Card" is a home assistant plugin that display information of 1 to 12 pre-defined sensors of your swimming pool : temperature, pH, ORP levels and TDS but also if you need them : salinity, CYA, calcium, phosphate, alkalinity, filter pressure , free chlorine, total chlorine
54 stars 13 forks source link

Added min/max tickers and color config templates. #23

Open gregtakacs opened 1 year ago

gregtakacs commented 1 year ago

Screenshot from 2023-08-12 21-08-38

If the yaml template defines additional min/max sensors such as

ph: sensor.iopool_ph
ph_min: sensor.daily_ph_min
ph_max: sensor.daily_ph_max

They will display as tick marks on the bar chart.

For the sensors I use the statistics platform:

sensor:
  - platform: statistics
    name: "Daily pH Min"
    unique_id: <UUID>
    entity_id: sensor.iopool_ph
    state_characteristic: value_min
    max_age:
      hours: 24
  - platform: statistics
    name: "Daily pH Max"
    unique_id: <UUID>
    entity_id: sensor.iopool_ph
    state_characteristic: value_max
    max_age:
      hours: 24

Also templatized the color scheme of the bars:

normal_color: var(--dark-primary-color)
low_color: var(--primary-color)
warn_color: var(--light-primary-color)
marker_color: black
hi_low_color: red

or:

normal_color: green
low_color: yellow
warn_color: "#ff0000"
marker_color: rgba(255,0,0,0.8)
hi_low_color: rgba(255,0,0,0.6)

~TODO: Templatize the color tickmarks, right now they're all red with a bit of transparency on the min/max.~