Home-AssistantConfig/automation/sunrise_turnon_and_off.yaml

45 lines
1.2 KiB
YAML
Executable File

###################################
## Sunrise and Sunset stuff
###################################
- alias: 'Sunset Stuff on'
trigger:
- platform: sun
event: sunset
- platform: time
after: '20:00:00'
#Time trigger is until I replace the stupid switch.
# - platform: event
# event_type: halloween_lights_on
action:
- service: switch.turn_on
entity_id: switch.foyer_outlet
- service: light.turn_on
entity_id: light.outdoor_bathroom
- service: scene.turn_on
entity_id: scene.december_front
######################################################################
- alias: 'Sunset Stuff off'
trigger:
- platform: sun
event: sunrise
offset: '-03:30:00'
# - platform: event
# event_type: halloween_lights_off
action:
- service: light.turn_off
entity_id: group.outdoor_front_lights
data:
transition: 1200
- service: light.turn_off
entity_id: light.outdoor_bathroom
- service: light.turn_off
entity_id: group.outdoor_lights
- service: script.switch_turn_off_all