I used this automation while away on vacation and it worked as expected. I have a "Vacation Mode Switch" toggle that when I turn it on certain actions are performed. Then I also have other triggers which look at the sun's elevation, a light sensor value, and also the time of 11:30 PM.
My concern is if I leave the automation enabled after returning from vacation, the triggers will still be actively listening for these events but performing no action, since I have the condition "If vacation mode switch is on", so if switched off, no actions will be executed.
Should I simply disable this automation when I'm not on vacation? Or is there a better way to write it so the triggers are not still waiting for an event?
-Thanks
alias: Vacation Mode
description: ""
triggers:
- trigger: state
entity_id:
- input_boolean.vacation_mode_toggle
from:
- "off"
to:
- "on"
id: vacation mode on
- trigger: state
entity_id:
- input_boolean.vacation_mode_toggle
from:
- "on"
to:
- "off"
id: vacation mode off
- trigger: numeric_state
entity_id:
- sun.sun
attribute: elevation
below: -1
id: dusk elevation
- alias: Dusk - When Aqara T1 Light Sensor is Below 75
entity_id: sensor.aqara_t1_light_sensor
below: 75
trigger: numeric_state
id: dusk lux
- trigger: time
at: "23:30:00"
id: lights off
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- vacation mode on
sequence:
- action: automation.turn_off
metadata: {}
target:
entity_id: automation.thermostat_scheduler_test
data:
stop_actions: true
enabled: true
- action: climate.set_temperature
metadata: {}
target:
entity_id:
- climate.t6_pro_z_wave_programmable_thermostat
- climate.t6_pro_z_wave_programmable_thermostat_2
data:
hvac_mode: heat_cool
target_temp_low: 66
target_temp_high: 80
enabled: true
- conditions:
- condition: trigger
id:
- vacation mode off
sequence:
- action: automation.turn_on
metadata: {}
target:
entity_id: automation.thermostat_scheduler_test
data: {}
- action: climate.set_temperature
metadata: {}
target:
entity_id:
- climate.t6_pro_z_wave_programmable_thermostat
- climate.t6_pro_z_wave_programmable_thermostat_2
data:
hvac_mode: heat_cool
target_temp_low: 68
target_temp_high: 78
enabled: true
- conditions:
- condition: trigger
id:
- dusk lux
- dusk elevation
- condition: state
entity_id: input_boolean.vacation_mode_toggle
state:
- "on"
enabled: true
sequence:
- action: light.turn_on
metadata: {}
target:
entity_id:
- light.office_lamp_3
- light.living_room_lamp
data: {}
- action: switch.turn_on
metadata: {}
target:
entity_id:
- switch.bedroom_lamp
- switch.bernard_s_lamp
data: {}
- conditions:
- condition: trigger
id:
- lights off
- condition: state
entity_id: input_boolean.vacation_mode_toggle
state:
- "on"
sequence:
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.office_lamp_3
- light.living_room_lamp
- light.garage_lights
data: {}
- action: switch.turn_off
metadata: {}
target:
entity_id:
- switch.bedroom_lamp
- switch.bernard_s_lamp
- switch.porch_light
data: {}
mode: single
