Changing OH-Guage colour with an expression

Hi

I am tying to make a thermostat Widget that uses an oh-gauge component with the gauge changing colour depending if the heating for the zone is ON or Off. I can do it with a numeric value such Temperature like this

valueTextColor: =Number.parseFloat(items[props.actualTemperature].state) >= 0 ?
                      'red' :'green'

But the thing for the heating actuator has only 2 text values “ON” and “Off”. What expression do I use to give a red color in the “ON” state?

Thanks

Probably test the ON /OFF and change the colour using those values

valueTextColor: =(items[props.switch].state) == "ON" ?
                      'red' :'green'

Thanks. I will give it a try.

Did you get it to work?