Suggestion to use in automations

I have an automation to control my AC, if temperature is below 22°C turns off the AC.
I create an input_number to control the below temp but automations can’t be setup to use {{ states}}.
It’s nice to use that on many other automations.

You need to use template not state to use that as a trigger