Thermostat target temperature condition

Hi, i am trying to use the set target temperature of a thermostat as a condition for an automation.
So for example if target temperature is above 22 do something.
Any way i can do this?

Thanks

Solved. Instead of using the device condition use the numeric state condition and select the entity of your thermostat than take the temperature attribute.