Created
April 6, 2020 21:26
-
-
Save pjanuario/fd4b499aeeb663998f95706d022df68a to your computer and use it in GitHub Desktop.
Homeassistant sunset automation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 15m after the sunrise | |
# - Open the covers | |
# - Turn off ligths | |
- id: sunrise | |
alias: 'Sunrise automation' | |
trigger: | |
- platform: sun | |
event: sunrise | |
offset: '00:15:00' | |
action: | |
- entity_id: cover.living_room | |
service: cover.open_cover | |
- entity_id: light.outside_back | |
service: light.turn_off | |
# After sunset | |
# - Close the covers | |
# - Turn on outside lights | |
- id: sunset | |
alias: 'Sunset automation' | |
trigger: | |
- platform: sun | |
event: sunset | |
action: | |
#- delay: '00:{{ (range(1,10)|random|int) }}:00' | |
- entity_id: cover.living_room | |
service: cover.close_cover | |
- entity_id: light.living_room_center | |
service: light.turn_on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment