I have fan which ventilates my garage and uses an outside temperature sensor and a temperature sensor in the garage. When it’s cooler outside than in the garage, the fan turns on and vice-versa. It’s been working great except there’s a minute or two when the threshold is crossed mid-morning and evening where it turns the fan off and on again while the temps are just across the threshold and then back. What’s the best way to add stability so that it doesn’t do this? I’ve tried adding a delay as the first step in the action, but that didn’t seem to help.
- id: '1689129656297'
alias: Garage Vent On Summer
description: When the Garage is hotter than the outside temp the vent
turns on
trigger:
- platform: template
value_template: '{{ states(''sensor.garage_temperature'')|float > (states(''sensor.outside_temperature'')|float)
}}'
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.garage_ventilation_fan
- service: notify.mobile_app_tylers_iphone
data:
message: Stopping Garage Ventilation
mode: single
- id: '1689175984298'
alias: Garage Vent Off Summer
description: When the Garage is cooler than the outside temp the vent
turns off
trigger:
- platform: template
value_template: '{{ states(''sensor.garage_temperature'')|float < (states(''sensor.outside_temperature'')|float)
}}'
condition: []
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.garage_ventilation_fan
- service: notify.mobile_app_tylers_iphone
data:
message: Starting Garage Ventilation
mode: single