I’m trying to automate my front porch light based on time. I have used the Automations section of the Hass.io GUI but the light doesno’t seem to come on. It works fine if used with the switch in Hass.io. I wanted the light to turn on and suset -30 min and turn off at 11pm
Here is my automtatinos.yaml
action:
data:
entity_id: light.yeelight_white_f0b429a93ec5
service: light.turn_on
alias: Front Light On
condition: []
id: ‘1517352677724’
trigger:
event: sunset
offset: -00:30:00
platform: sun
action:
data:
entity_id: light.yeelight_white_f0b429a92f5f
service: light.turn_off
alias: Front Light off
condition: []
id: ‘1517352731520’
trigger:
Here is mine. It turns on 15 minutes after sunset then turns off at 1 am. Then I add one more step such that if someone turns the light back on manually after 1 am then it stays on until sunrise then is automatically shut off.
- id: deck_light_on_at Dusk
alias: Deck Light On at Dusk
trigger:
platform: sun
event: sunset
offset: "+00:15:00"
action:
service: homeassistant.turn_on
entity_id: light.sengled_e11g13_03070a4c_1
- id: deck_light_off_at_x_time
alias: Deck Light Off at 1am
trigger:
platform: time
hours: 01
minutes: 00
seconds: 00
action:
service: homeassistant.turn_off
entity_id: light.sengled_e11g13_03070a4c_1
- id: deck_light_off_at_sunrise
alias: Deck Light Off at Sunrise
trigger:
platform: sun
event: sunrise
action:
service: homeassistant.turn_off
entity_id: light.sengled_e11g13_03070a4c_1
I wanted to do something similar porch lights + garage outside lights automation.
turn on dusk-20 minutes, turn off 11pm. by default 20% of brightness.
if there is events(see below), increase brightness to 100%, change back to 20% after 30 seconds of no event.
from 11pm to dawn+20 minutes, by default off. if there is events, turn on lights to 100%, turn off after 30 seconds of no events.
events includes: motion by ring doorbell, someone ring the doorbell, front door open, or garage door open.
Not overly complicated but you will likely need to do a lot of that in multiple automation. Otherwise the templates will indeed get very complicated if even at all possible.