Here is a potential work-around to the problem mentioned by napalmcsr:
Define a String type global variable in rule machine. Create a rule triggered by any change to thermostat operating state. In the rule, set the variable to the attribute value thermostat operating state. Then, use that variable value for whatever you originally wanted to use thermostat operating state for.