Home-AssistantConfig/config/automation/Timed_Triggers/sunrise_turn_off.yaml

43 lines
1.1 KiB
YAML
Executable File

###################################
## Sunrise and Sunset stuff
###################################
- alias: 'Sunset Stuff off'
id: 232b95e8-1354-4f63-8ae4-1063f300f2f0
mode: single
trigger:
- platform: sun
event: sunrise
offset: '-02:00:00'
action:
- service: script.interior_off
- service: homeassistant.turn_off
entity_id:
- group.landscaping
- delay: '00:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: homeassistant.turn_off
entity_id:
- group.exterior_lights
- light.outdoor_front_lights
- light.outdoor_pool_lights
- group.outdoor_seasonal
- service: light.turn_off
entity_id: all
- wait_template: >-
{{ states.sun.sun.state == 'above_horizon' }}
- service: homeassistant.turn_off
entity_id:
- group.master_bathroom_accents
- group.exterior_lights
- light.outdoor_front_lights
- group.outdoor_seasonal
- service: input_boolean.turn_off
entity_id:
- input_boolean.medicine
- input_boolean.guest_mode