Automation on temperature change - error in condition

I would like to turn on the AC when the temperature rises above 25C

After typing the following in Developer Tools, it shows me true.

{{ states.climate.klima_gabinet.attributes.current_temperature | int > 25 }}

Unfortunately, when I add the following condition in the automation, I get an error message: template value should be a string for dictionary value @ data['value_template']. Got None

condition: template
value_template: "{{ states.climate.klima_gabinet.attributes.current_temperature | int > 25 }}"

what am I doing wrong?

Other than ignoring this recommendation:

Use this format instead:

value_template: "{{ state_attr('climate.klima_gabinet', 'current_temperature') | int(0) > 25 }}"

You did nothing wrong. It is an issue with the template editor.

still not working :frowning:



1 Like