Influx data ("Idle", "Cooling")

I have my home automation system dumping data into influx. Right now, the data is stored for my HVAC as stuff like “Cooling”, “Idle”

What I am trying to do is get some graphs showing how much my AC is running. Is there an easy way to do a transform to convert “Cooling” = 1 and “Idle” = 0.