I have created (and not tested) an automation which intentionally triggers for every temperature change below a threshold (turn off ac) and above a threshold (turn on ac - heat mode).
Will a numeric state trigger when temperature changes, but doesnt cross the threshold?
In example:
Automation 1: Turn on AC if temperature is below 22 celsius.
Automation 2: Turn off AC if door open for more than X minutes, no matter the temperature.
In real life it could be that its below 22 degrees inside, the AC is on, but one of the kids leaves the door open. This will turn off the AC. Without any additional automations, when the door is closed again, will my numeric state trigger in automation 1 be sufficiant to trigger the AC on again, if lets say the temperature is 19 degrees inside? Or does it not trigger until temperature is above 22, and then falls back to below 22 (which will not happen)?
Here is the entire automation for those specially interested. You are warned, its a mess.
- alias: Turn boolean "AC on" on
trigger:
- platform: numeric_state
entity_id: sensor.stue_temp
below: 21.0
for: '00:10:00'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.varmepumpe_on
- service: input_boolean.turn_off
entity_id: input_boolean.varmepumpe_off
- alias: Turn on boolean "AC off"
trigger:
- platform: numeric_state
entity_id: sensor.stue_temp
above: 21.1
for: '00:10:00'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.varmepumpe_on
- service: input_boolean.turn_on
entity_id: input_boolean.varmepumpe_off
- alias: Turn on AC when boolean "AC on" turns on (nice name, I know)
trigger:
- platform: state
entity_id: input_boolean.varmepumpe_on
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.kjorer_hjemmefra
state: 'off'
- condition: state
entity_id: input_boolean.godnatt
state: 'off'
- condition: state
entity_id: input_boolean.gaar_hjemmefra
state: 'off'
- condition: state
entity_id: binary_sensor.sensor_terrassesdor
state: 'off'
- condition: state
entity_id: binary_sensor.sensor_inngangsdor
state: 'off'
action:
- service: climate.turn_on
entity_id: climate.varmepumpe
- delay: '00:00:10'
- service: climate.set_temperature
data:
entity_id: climate.varmepumpe
temperature: 23
- delay: '00:00:10'
- service: climate.set_fan_mode
data:
entity_id: climate.varmepumpe
fan_mode: auto
- delay: '00:00:10'
- service: climate.set_hvac_mode
data:
entity_id: climate.varmepumpe
hvac_mode: heat
- service: input_boolean.turn_off
entity_id: input_boolean.varmepumpe_off
- alias: Turn off AC when boolean "AC off" turns on.
trigger:
- platform: state
entity_id: input_boolean.varmepumpe_off
from: 'off'
to: 'on'
action:
- service: climate.turn_off
entity_id: climate.varmepumpe
- service: input_boolean.turn_off
entity_id: input_boolean.varmepumpe_on
- alias: Turn off AC when doors been open for X minutes.
trigger:
- platform: state
entity_id: binary_sensor.sensor_door1
from: 'off'
to: 'on'
for: '00:03:00'
- platform: state
entity_id: binary_sensor.sensor_door2
from: 'off'
to: 'on'
for: '00:03:00'
condition:
condition: or
conditions:
- condition: state
entity_id: climate.varmepumpe
state: 'heat'
- condition: state
entity_id: climate.varmepumpe
state: 'cool'
action:
- service: climate.turn_off
entity_id: climate.varmepumpe
- service: input_boolean.turn_off
entity_id: input_boolean.varmepumpe_on
- service: input_boolean.turn_on
entity_id: input_boolean.varmepumpe_off