Hey everyone, I’m trying to set up an automation in my garage that turns on a vent fan when the outside temperature becomes cooler than the inside temperature by at least 3 degrees. I live in a really hot area where temperatures often reach over 100°F during the day, which makes my garage quite uncomfortable, especially in the evenings.
I’ve been using HASS.OS v 5.10.42 installed on my NUC and found a helpful link that I thought I could modify for my needs. However, despite trying various combinations of templates, I haven’t been able to get it working properly. Here’s what I’ve come up with so far:
For turning the vent on when the garage is 3 degrees hotter than the outside:
alias: Garage Vent On Summer
description: When the Garage is 3 degrees hotter than the outside temp the vent turns on
trigger:
- platform: template
value_template: >-
“{{ state_attr(‘sensor.garage_temperature1’, ‘temperature’)|float > ( states(‘sensor.thermostat_outdoor_temperature’)|float -3 ) }}”
condition: - condition: template
value_template: ‘’’ ‘’’
action: - service: switch.turn_on
target:
entity_id: switch.garage_vent
mode: single
And for turning it off when the outside temp is 3 degrees warmer:
alias: 'Garage Vent Off ’
description: >-
Will turn the garage vent off when the outside temperature is three degrees warmer than the garage
tigger:
- platform: template
value_template: >-
“{{ state_attr(‘sensor.thermostat_outdoor_temperature’, ‘temperature’)|float < ( states(‘sensor.garage_temperature1’)|float -3 ) }}”
condition: - condition: template
value_template: ‘’’ ‘’’
action: - service: switch.turn_off
target:
entity_id: switch.garage_vent
mode: single
Any tips or pointers would be greatly appreciated! I think this kind of automation could be really useful for controlling window fans or other ventilation systems based on temperature differences. It would be amazing to get this working and share the solution with others who might find it helpful. Thanks in advance for your help!