Here is what I currently have but when I setup the automation it never get’s fired.
blueprint:
name: Garage Door activated Light
description: Turn on a light when garage door is opened.
domain: automation
input:
garagedoor_entity:
name: Garage Door
selector:
entity:
domain: cover
device_class: garage
light_target:
name: Light
selector:
target:
entity:
domain: light
door_closed_wait:
name: Wait time
description: Time to leave the light on after door is closed
default: 120
selector:
number:
min: 0
max: 3600
unit_of_measurement: seconds
mode: single
max_exceeded: silent
trigger:
platform: state
entity_id: !input garagedoor_entity
from: "Closed"
to: "Opening"
action:
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
platform: state
entity_id: !input garagedoor_entity
from: "open"
to: "closed"
- delay: !input door_closed_wait
- service: light.turn_off
target: !input light_target
condition:
- condition: or
conditions:
- condition: sun
after: sunset
after_offset: "-00:45:00"
- condition: sun
before: sunrise
before_offset: "00:45:00"
When I look in history for cover.main
(my main garage door) I can see it go through the states Closed, Opening, Open, Closing, Closed.