Condition with calculated values

Hi folks,

I want to trigger an automation when the difference between two temeratures is above a specivic value.

How can I do this?

Thanks a lot

Something like this:

trigger:
  - platform: template
    value_template: "{{ (states('sensor.temp1')|float - states('sensor.temp2')|float) > 2 }}"

Templates are a closed book for me. :frowning_face:

So open it. We all had to start learning somewhere.

1 Like