My intent is to use both fields and variables in the same script. The field is, of course, the input and the variables are derived using this input. The purpose of the variables is mostly to DRY things up. I believe I may be hitting a case where variables are resolved before fields, but I'm not sure.
When I call this script via script.turn_on or script.<script entity> with the field input of a climate entity, it errors out with thermostat is Undefined as if I had not provided thermostat input.