I’m pretty new to this so please forgive me if this has already been covered somewhere, I can’t seem to find it.
I’ve set up an automation to turn on my garage lights for 10 minutes when arriving after dark. The automation works fine with a single device being tracked ( my phone via asuswrt ) as soon as I add in more tracked devices such as my wifes phone it will no longer trigger. I would like the automation to function reagardeless of the other devices state. If i’m home and my wife arrives later in the evening I would still like the lights to come on. I’m hoping I’ve missed something easy.
There are no errors in the logs, it just doesn’t fire.
alias: 'Turn Garage Light when I arrive after sunset'
trigger:
platform: state
entity_id: group.all_devices
from: 'not_home'
to: 'home'
condition:
condition: and
conditions:
- condition: sun
after: sunset
after_offset: "-0:30:00"
- condition: state
entity_id: group.garage_lights
state: 'off'
- condition: state
entity_id: input_boolean.automation_override
state: 'off'
action:
service: homeassistant.turn_on
entity_id: "script.get_home_sunset"
get_home_sunset:
alias: "get home"
sequence:
# Cancel old off timer
- service: script.turn_off
data:
entity_id: "script.garage_off"
- service: homeassistant.turn_on
data:
entity_id:
- group.garage_lights
- service: script.turn_on
data:
entity_id: "script.garage_off"
garage_off:
alias: "Turn off garage lights after 10 minutes"
sequence:
- delay:
minutes: 10
- service: homeassistant.turn_off
data:
entity_id:
- group.garage_lights