mini-graph-card icon indicating copy to clipboard operation
mini-graph-card copied to clipboard

Color threshold for secondary axis entities

Open MaJerle opened this issue 1 year ago • 2 comments

How can we set secondary axis color threshold?

I would like to have different ones for temperature and humidity.

type: custom:mini-graph-card
entities:
  - entity: sensor.temp_hum_sensor_5_terrace_temperature
    name: Temperature
  - entity: sensor.temp_hum_sensor_5_terrace_humidity
    name: Humidity
    y_axis: secondary
name: Temperature
points_per_hour: 4
color_thresholds:
  - value: 0
    color: '#FF0000'
  - value: 18
    color: '#FFFF00'
  - value: 20
    color: '#00FF00'
  - value: 24
    color: '#FFFF00'
  - value: 28
    color: '#FF0000'

MaJerle avatar Jul 27 '24 16:07 MaJerle

I don't think, it is possible. But maybe you could just extend the list of thresholds to the humidity values' range?

Something like:

color_thresholds:
  - value: 0
    color: '#FF0000'
  - value: 18
    color: '#FFFF00'
  - value: 20
    color: '#00FF00'
  - value: 24
    color: '#FFFF00'
  - value: 28
    color: '#FF0000'
  - value: 35
    color: '#FF0000'
  - value: 35.1
    color: '#00FF00'
  - value: 60
    color: '#FFFF00'
  - value: 70
    color: '#FF0000'

akloeckner avatar Aug 06 '24 22:08 akloeckner

@MaJerle Currently thresholds are defined globally for all entities. There is a related FR, you may start monitoring it or contribute. Meanwhile you may use a method proposed by @akloeckner. Please close the issue if resolved. All per-entity-thresholds-related discussions - please continue in that mentioned thread.

ildar170975 avatar Aug 07 '24 00:08 ildar170975

No feedback from OP for more than a month. Closing.

ildar170975 avatar Sep 27 '24 18:09 ildar170975