home-assistant-configuration/automation/garage.yaml

121 lines
2.3 KiB
YAML

#
#
# Garage
#
############
- alias: Close Garage at Nine
trigger:
- platform: time
hours: 21
minutes: 0
seconds: 0
condition:
- condition: state
entity_id: binary_sensor.garage_door
state: 'on'
action:
- service: script.close_garage
- alias: Garage Open At Sunset
trigger:
- platform: sun
event: sunset
condition:
- condition: state
entity_id: binary_sensor.garage_door
state: 'on'
action:
- service: script.driveway_on
- alias: Garage Closed
trigger:
- platform: state
entity_id: binary_sensor.garage_door
from: 'on'
to: 'off'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.garage_issue
- alias: Garage Issue
trigger:
- platform: state
entity_id: input_boolean.garage_issue
to: 'on'
action:
- service: script.garage_failed_to_close
#- alias: Garage Issue Resolved
# trigger:
# - platform: state
# entity_id: input_boolean.garage_issue
# to: 'off'
# action:
# - service: script.garage_now_closed
#- alias: Garage Closing
# trigger:
# - platform: mqtt
# topic: smartthings/Garage Door/door
# payload: closing
# action:
# - service: script.security_check_garage
- alias: Garage Opening
trigger:
- platform: state
entity_id: binary_sensor.garage_door
from: closed
to: open
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: tts.google_say
data:
entity_id: media_player.hass_speaker
message: Garage is Opening
- alias: Garage Opening Driveway Lights On
trigger:
- platform: state
entity_id: binary_sensor.garage_door
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: script.driveway_on
- alias: Garage Closing Driveway Lights Off
trigger:
- platform: state
entity_id: binary_sensor.garage_door
from: 'on'
to: 'off'
action:
- service: homeassistant.turn_on
entity_id: script.driveway_off
- alias: Garage Motion after Sunset
trigger:
- platform: state
entity_id: binary_sensor.garage_motion
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: notify.jeff_ios
data:
message: 'Motion: Garage'