Home-AssistantConfig/config/automation/away.yaml

42 lines
1.2 KiB
YAML
Executable File

######################################################################
## Shut it all down. No one is here
######################################################################
- alias: 'Away Mode'
id: 712e845a-9d72-4993-b8af-890b167c807b
mode: single
trigger:
- platform: state
entity_id: binary_sensor.downstairs_nest_away
to: 'on'
- platform: state
entity_id: group.family
to: 'not_home'
# - platform: event
# #Sent from IFTTT Webhooks : {"action":"IFTTT_Away:}
# event_type: ifttt_webhook_received
# event_data:
# action: IFTTT_Away
condition:
- condition: state
entity_id: group.family
state: 'not_home'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: script.interior_off
- service: switch.turn_off
entity_id: switch.back_landscaping
# Arms Alexa Guard unless Guest Mode is on. Disarms in the Announcements.yaml
- condition: template
value_template: >
{{ states.input_boolean.guest_mode.state != "on" }}
- service: alarm_control_panel.alarm_arm_away
entity_id: alarm_control_panel.alexa_guard