First format your code properly, so that we can see if there’s any problem in indent etc…
But, quick look shows that you are not defining hvac mode, you only turn climate on and set fan mode. Set HVAC mode to “cool” also.
Second, i think that state: “>21.00” won’t do. You must use state_above or similar…
EDIT: quick look in my automations: try similar as this as condition:
If i cut and then paste the YAML then that is what shows so I have no way i know of of pasting the formatted yaml.
An image is attached.
Why would i think it would work ? Well temperature is a number and i have used many similar things in automations.
I dont want it to act as a thermostat. This runs at sunset and if the bedroom is warm i want it to turn on the AC. There is another automation that runs in the morning to turn off all bedrooms .
Hence I would like help with the IF statement that is true if the temp is over 21.
The trace shows the state as 25.6 which is correct - and is also over 21 - hence my expectation that it would work
That is literally impossible. state: does not accept any kind of conditionals. In fact, all the code does in HA is compare the value in state: to the state value of the entity. It does no conditional checking at all. Ever.