mboarman
(Mark Boarman)
April 21, 2022, 1:50pm
1
Is it possible to change the severity colors on the gauge card? I tried to change the label-badge in my current theme (label-badge-green: “#9bc53d ”) but it doesn’t seem to have any affect on the card. Are the Red/Green/Yellow colors baked in or can they be overridden?
Any help or suggestions would be GREATLY appreciated!
Theme should work.
Themes reloaded?
Since a few version the gauge has the theme option.
Create a theme in your themes.yaml
th_gauge_3:
label-badge-blue: "#55acee"
label-badge-green: "#9bc53d"
label-badge-yellow: "#fde74c"
label-badge-red: "#c3423f"
and define it in the gauge config.
theme: th_gauge_3
So you can use every color for the gauges.
mboarman
(Mark Boarman)
April 21, 2022, 7:17pm
3
Hey! Thanks for the reply!
Reloaded, cache cleared and even rebooted…That’s why I was thinking the colors were baked into the card?!
Found it.
There were changes a while ago.
Use this in your theme:
th_gauge_4:
info-color: "grey" # former label-badge-blue
success-color: "pink" # former label-badge-green
warning-color: "orange" # former label-badge-yellow
error-color: "green" # former label-badge-red
1 Like
mboarman
(Mark Boarman)
April 21, 2022, 8:27pm
5
Awesome! I’ll play with it tonight!! Thank you! Thank you! Thank you!
You can take it a step further:
I updated my gauge configuration one more time, making the color changing a little more gradual, and adding one more color.
With this gauge the color changes in 40 steps from red via yellow to green over a range from 0 % to 100 %:
type: gauge
entity: input_number.number
name: Test
unit: '%'
needle: false
min: 0
max: 100
segments:
- from: 0
color: '#ff0d00'
- from: 2.5
color: '#ff1a00'
- from: 5
color: '#ff2600'
- from: 7.5
color: '#ff3300'
- from: 10
color: '#ff4…