Is there any way to get HADashboard text (or icon) to dynamically change color based on the sensor value?
I know you can do basic state changes such as:
icon_active:
icon_inactive:
and there’s styles
title_style: "font-size: 14pt;"
text_style: "font-size: 16pt; font-color: white;"
value_style: "color: yellow;"
But I want the style color/icon color to change based on a sensor value.
I’m tracking my Solar power production vs Power Grid usage and want to show a type of traffic light for the state of consumption (negative being sending power to the grid)
eg: Power Sensor value: less than -1000 GREEN, -1000<500KW ORANGE, greater than 500KW RED for example?
Thanks