Open Tamas-Toth-ebola opened 2 years ago
Hey, could you try using the label
value instead of the incoming value? It shouldn't do that though :)
Hi, I can confirm the same, I also have the described problem.
Is there any progress on this? @jlsjonas what do you mean to use label
instead of incoming value
? do you mean in the colour_thresholds using label
instead of value
? If so, I tried it and it throws an error...
Hey, I meant to use the label as value (f.e. Hazardous instead of hazardous) as we're not using the raw values.
For backwards compatibility, we'll have to support both when(/if) fixing this
I tried to use the label value as well (however one must still indicate the label value as value: Hazardous
instead of label: Hazardous
- the color thresholds requires a value, if using label as an indicator, it throws an error.
Regardless of the test, it did not work anyway unfortunately...
Hi, any solution for this? thanks
Hi again,
I have already managed to get it to work, I think what happens is that you have to use the keys of the values as defined in the state_map
This is my working setup:
type: custom:mini-graph-card
name: Estado del aire últimas 24h
entities:
- entity: sensor.sensores_salon_bme680_iaq_clasificaci_n
name: Calidad
font_size_header: 10
font_size: 56
hours_to_show: 24
hour24: true
points_per_hour: 60
update_interval: 30
line_width: 1
show:
labels: true
color_thresholds_transition: hard
color_thresholds:
- value: 0
color: '#7DFF00'
- value: 1
color: '#00FF00'
- value: 2
color: '#8FEE8F'
- value: 3
color: '#FFD500'
- value: 4
color: '#FFA500'
- value: 5
color: '#FF8C00'
- value: 6
color: '#FF4500'
state_map:
- value: Excelente
label: Excelente
- value: Buena
label: Buena
- value: Ligeramente contaminado
label: Ligeramente contaminado
- value: Moderadamente contaminado
label: Moderadamente contaminado
- value: Muy contaminado
label: Muy contaminado
- value: Severamente contaminado
label: Severamente contaminado
- value: Extrem. contaminado
label: Extremadamente contaminado
Hi!
First of all I would like to throw a very big 'thanks' for your work(s) as this card is almost the only card type in my HA config and I really love it. So really lot of thanks for your efforts so far!
But from another aspect I got a soft problem/bug at my use cases.
Environment:
If we use
state_map
s we can not usecolor_thresholds
with them (and I do not really see the reason of that), as the result is always the usage of the defined color in the thresholds object. Check the following sample.The config:
And the result:
Could anybody please help on it? Thanks for it in advance!