#What is it you want to happen

1 messages · Page 1 of 1 (latest)

cursive vessel
#

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?

quasi skiff
#

Why does the motion sensor trigger when the lights turn on or off? Is it a camera?

cursive vessel
#

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: ''
quasi skiff
#

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 😉

cursive vessel
#

Yeah fair enough 🙃

quasi skiff
#

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.

cursive vessel
#

Ah TIL about single mode

#

That was one of the things I was wondering about