#Turn off light when both motion sensors are cleared for 30s

1 messages · Page 1 of 1 (latest)

zealous marlin
#

currently I have this automation. One sensor in trigger, another in condition. However I notice that if condition wasn't met, the automation wouldn't "retest". How can I modify this so that I have the light turned off after both sensors are cleared for 30s?

description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.0x282c02bfffea7da9_occupancy
    to: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 30
conditions:
  - condition: state
    entity_id: binary_sensor.0x282c02bfffea7dbf_occupancy
    for:
      hours: 0
      minutes: 0
      seconds: 30
    state: "off"
actions:
  - type: turn_off
    device_id: 5cecfbfee1e1b8ec2920907e5c178863
    entity_id: 4b0d74cca6df94df9941a88ccf8ded07
    domain: light
mode: single
potent vessel
#

use both sensors in both the trigger and condition sections

zealous marlin
#

Think I should

#

will see how this goes for a few days.

#

Thanks

potent vessel
#

yep, 30 seconds for both trigger and condition

left geode
#

Or create a binary helper that has both motions in it, that is off if both motions are off, and on if one or the other is on. Then use THAT in your automation

#

That's how I do my garage light. I have 2 motions and 2 presence mmwave detectors out there, and have all 4 of them in a presence binary that is on if any of them trigger on.

#

Automation for when it has been off for 30s turns off the lights, while automation to turn them is instant.