I have an outside light (controlled within HA via a Shelly1) that I want to turn on for 10 minutes when I open the garage door (controlled within HA via OpenGarage).
I have created an automation to do this, but for some reason it doesn’t work, ie the light doesn’t come on when I open the garage. But the lights & garage door do work when I control them individually.
Many thanks, with @BebeMischa & @Paradox8 - you were very helpful. With a bit of tweaking it now works. For the help of others in the future, this is what I now have & it works perfectly.
Very happy
- id: '1555733330035'
alias: Outside Lights On (10 mins) - Garage Door
description: ''
trigger:
- platform: state
entity_id: cover.garage_door
from: closed
to: opening
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- service: switch.turn_on
target:
entity_id:
- switch.barn_lights
- switch.drive_lights
- wait_template: ''
timeout: 00:10:00
continue_on_timeout: true
- service: switch.turn_off
target:
entity_id:
- switch.barn_lights
- switch.drive_lights
mode: single