Files
home-assistant/packages/vacation/vacation.yaml
2023-03-22 15:16:54 -07:00

48 lines
1.5 KiB
YAML

# Vacation Package
# -----------------------------------------------------------------------------
# Vacation Automations
automation:
- alias: Vacation - Turn On Dining and Kitchen Lights at Sunset
trigger:
- platform: sun
event: sunset
offset: '-00:30:00'
conditions: "{{ is_state('input_select.house_presence_state', 'Extended Away') }}"
action:
- delay: "00:{{ range(0,59)|random|int }}:00"
- service: light.turn_on
target:
entity_id: light.dining_room_light
- service: light.turn_on
target:
entity_id: light.kitchen_light
- alias: Vacation - Turn On Living Room Lights after Dinner
trigger:
- platform: time
at: '18:30:00'
conditions: "{{ is_state('input_select.house_presence_state', 'Extended Away') }}"
action:
- delay: "00:{{ range(0,59)|random|int }}:00"
- service: light.turn_off
target:
entity_id: light.dining_room_light
- service: light.turn_off
target:
entity_id: light.kitchen_light
- service: light.turn_on
target:
entity_id: light.living_room_light
- alias: Vacation - Turn Off Living Room Lights at Bedtime
trigger:
- platform: time
at: '20:30:00'
conditions: "{{ is_state('input_select.house_presence_state', 'Extended Away') }}"
action:
- delay: "00:{{ range(0,59)|random|int }}:00"
- service: light.turn_off
target:
entity_id: light.living_room_light