Closed CosminFRC closed 1 year ago
Probably there are issues with color_thresholds
.
But check this, seems to work fine:
type: vertical-stack
cards:
- type: entities
entities:
- input_number.number
- type: custom:mini-graph-card
entities:
- entity: input_number.number
state_adaptive_color: true
color_thresholds:
- value: 0
color: red
- value: 100
color: green
- value: 200
color: blue
hours_to_show: 0.083333
points_per_hour: 3600
smoothing: false
color_thresholds_transition: hard
line_width: 1
lower_bound: 0
Suggestions:
1.Next time when you post a code - do not post a code with options which are not relevant to a problem (like group_by
etc).
Use options which HELP to localize an issue - like "normal" colors (hex values are not as clear as "red" or "green").
2.Check other open issues here, there are already present issues for the same (or similar) problem, no need to register one more.
I copied your code and modified what needed to be modified and apparently it works. I will also take into account your suggestions. Thank you.
I myself decided NOT to use color_thresholds
because they MAY NOT work properly...
Depends on many factors, unfortunately.
And please make a decision - either CLOSE the issue as solved or add necessary explanations what exactly was wrong and if you can reproduce it.
Apparently it was working but in fact it is not. The line is colored with the color from the first threshold value and then the color does not change when the threshold is exceeded.
Are you talking now about "my code + added your options"? Post:
Yes, your code with my options. Here are some printscreens at different sensor values and no line color change.
Test with: points_per_hour - 2x bigger than the actual update frequency smoothing: false color_thresholds_transition: hard
Check if it changes anything.
I modified what you told me and it seems to work now. I'll test it for a few hours and if everything works correctly I'll close the problem as "Solved". Thank you.
Hi,
I have a graph card for a humidity sensor but I can't make it work as it should. The line gets the last treshold color and it doesn't change color when the state changes, although the state color changes according to the tresholds. So, the state color is working great but the line color doesn't. Maybe I messed up something in the yaml config. but I really don't know.