I am trying to figure out how to configure an automation based on 2 temp sensor readings.
I am initially attempting to do this in the web interface but I may wind up having to do this in yaml.
I am looking for some advice on how to do this.
I have 2 temp sensors. Temp1 and Temp2
if Temp1 is 10 degrees greater than Temp2 then turn on Device1
If I can figure this out then I can do the exact same thing backwards that would turn off the device.
trigger:
- platform: template
value_template: >
{% if states('sensor.temp1') not in ['unknown','unavailable']
and states('sensor.temp2') not in ['unknown','unavailable'] %}
{{ (states('sensor.temp1')|int(0) + 10) > states('sensor.temp2')|int(0) }}
{% endif %}