Mapping thermostat operating state - String to Number

Newbie here – so apologies if this is a simple answer.

I’m attempting to map data from Influxdb1.8 which is part of my heating system. All temps map fine but I’m trying to overlap when my heater is operational.

The data pulled from my system comes in as a string called thermostatOperatingState. In that string it’s either idle or heating.
I’ve tried to map the data to numerical values which show on the table but when I transform the variable to a number from string, they disappear and the field is blank.

Is there an easy way to map this text string to a numbers so I can graph it? I hope so.

appreciate the help.

Perhaps I need to transform this data before it enters influx. Maybe its within influx I need to modify it. Unsure. It looks fine on a table but I can’t get it to map on a graph.
If this is a basic ask, and some documentation outlines it, I’m happy to search.

appreciate any help folks will offer.