#What is it you want to happen
1 messages · Page 1 of 1 (latest)
For the automation to not trigger when the light turns off after my delay
Maybe there's a way to set a piece of state somewhere before turning the light off, and check that when the automation is triggered?
Why does the motion sensor trigger when the lights turn on or off? Is it a camera?
Yeah it's a camera that's independent from the light
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: binary_sensor.carport_motion
from: 'off'
to: 'on'
action:
- alias: Turn on the light
service: light.turn_on
target:
area_id: garage
- alias: Wait until there is no motion from device
wait_for_trigger:
platform: state
entity_id: binary_sensor.carport_motion
from: 'on'
to: 'off'
- alias: Wait the number of seconds that has been set
delay: 120
- alias: Turn off the light
service: light.turn_off
target:
area_id: garage
id: '1669172791974'
alias: Carport motion light
description: ''
Cameras tend not to be good motion sensors, they detect the number of pixels changed—and the light turning on and off changes lots of pixels 😉
Yeah fair enough 🙃
But you could add a delay at the end of the automation and set the whole automation to single mode to try and work around it.