I’m having trouble wrapping my head around the structure of how HA does automations. I’ve wrote the simplest blueprint that I need for my house and have a few questions about it. It will cycle the HVAC fan ON and OFF to circulate the air in the house if the heat/a/c has not been running, but only turn OFF the fan if the automation turned it ON. I do this because I have a whole house humidifier and dehumidifier that will be turning ON the HVAC fan to run and do not want them fighting for control over the fan. It will also not cycle the fan if the house state is at a curtain state because I will be gone for a few days(no need to freshen the air and help equalize the temp in the house if no one home).
-
When the automation restarts from being triggered again will the timers that were running stop? or do I need to cancel them? or will it not matter if the state that started them is false now they will not run the sequence?
-
I want to use an internal helper inside the automation that will not be added to my entities it is input_boolean.hvac_circ_on. Do I need to declare it somewhere or will it work fine just putting it in the code like I did.
-
Am I trying to go about this all the wrong way?
blueprint:
name: HVAC Fan Circulate
description: Control HVAC fan to circulate on and off
domain: automation
input:
thermostat:
name: Thermostat
selector:
entity:
domain: climate
fan_on_time:
name: Fan ON time
default: 30
selector:
number:
min: 5
max: 120
unit_of_measurement: minutes
fan_off_time:
name: Fan OFF time
default: 30
selector:
number:
min: 5
max: 120
unit_of_measurement: minutes
house_state:
name: House State
selector:
entity:
domain: input_select
house_state_not:
name: House State to NOT circulate in
default: ""
trigger:
platform: state
entity_id: !input thermostat
attribute: hvac_action
mode: restart
action:
choose:
# Turn fan ON
- conditions:
- condition: and
conditions:
- condition: state
entity_id: !input thermostat
attribute: hvac_action
state: 'off'
for:
minutes: !input fan_off_time
- condition: not
conditions:
condition: state
entity_id: !input house_state
state: !input house_state_not
sequence:
- service: climate.set_fan_mode
target:
entity_id: !input thermostat
data:
fan_mode: 'on'
- service: input_boolean.turn_on
target:
entity_id: input_boolean_hvac_circ_on
# Turn fan OFF if automation started fan
- conditions:
- condition: state
entity_id: !input thermostat
attribute: hvac_action
state: 'on'
for:
minutes: !input fan_on_time
- condition: state
entity_id: input_boolean.hvac_circ_on
state: 'on'
- condition: not
conditions:
condition: state
entity_id: !input thermostat
attribute: hvac_action
state: fan
sequence:
- service: climate>set_fan_mode
target:
entity_id: !input thermostat
data:
fan_mode: auto
- service: input_boolean.turn_off
target:
entity_id: input_boolean_hvac_circ_on