Home-AssistantConfig/config/automation/away.yaml

43 lines
1.3 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
######################################################################
## Shut it all down. No one is here
######################################################################
# Define an alias for this automation
2018-01-02 00:00:45 +00:00
- alias: 'Away Mode'
# Give the automation a unique ID
2020-07-20 18:33:03 +00:00
id: 712e845a-9d72-4993-b8af-890b167c807b
# Set the mode to "single"
mode: single
# Set the trigger for the automation
2018-01-02 00:00:45 +00:00
trigger:
# The automation will also be triggered when the state of the "group.family" entity changes to "not_home"
2018-01-02 00:00:45 +00:00
- platform: state
entity_id: group.family
to: 'not_home'
2020-02-15 21:22:42 +00:00
# Set the conditions for the automation to run
2018-01-02 00:00:45 +00:00
condition:
# The automation will only run if the state of the "group.family" entity is "not_home"
2018-01-02 00:00:45 +00:00
- condition: state
entity_id: group.family
state: 'not_home'
# The automation will also only run if the state of the "input_boolean.guest_mode" entity is "off"
2018-01-02 00:00:45 +00:00
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
# Set the actions to be performed by the automation
2018-01-02 00:00:45 +00:00
action:
# Lock the front door
- service: lock.lock
entity_id: lock.front_door
# Turn off all interior lights and devices
2018-01-02 00:00:45 +00:00
- service: script.interior_off
# Turn off the back landscaping lights
2018-01-02 00:00:45 +00:00
- service: switch.turn_off
entity_id: switch.back_landscaping
2024-04-24 04:21:06 +00:00