I am trying the following automation
if my garage door is opened between the Sunset and Sunrise I wanted to turn on the Garage light Switch.
I also wanted to turn of the lights 5 minutes after the door is closed, ( I haven’t added this part yet, as I am not sure how do do that)
Here is my Automation YAML
alias: Tun on the Garage Lights if Garage Entrance Door is open
description: ''
trigger:
- platform: state
entity_id: binary_sensor.garage_door
from: 'off'
to: 'on'
condition:
- condition: sun
after: sunset
before: sunrise
action:
- service: switch.turn_on
target:
entity_id: switch.garage_light_mss550x_main_channel
mode: single
My automation is not triggering or running, can someone tell me what am I doing wrong here? Also can you please guide me on what configuration I have to add to turn of the lights 5 mins after I close the door
2 posts - 1 participant