#Not sure how to create this automation

1 messages · Page 1 of 1 (latest)

cedar spade
#

Here is the scenario

Trigger will be occupancy sensor, on/off (and maybe timer event).

Person walks into area, gets detected i.e. on. Its not presence sensor, so the detector goes off even if the person is in the area just not moving/or being still. Some time passes (4 to 15 minutes), the person leaves, gets detected again (i.e. on), then leave the area, and sensor isoff again

Person would spend a minimum of 4 minutes in this area, but can also be as long as 15 minutes.

I would like to create an automation where I get a notification when the person enters (that easy), and then leaves the area. The latter is not so easy because there is a minumum time required.

I was thinking of using wait-for-trigger, with max 15 min timeout OR perhaps a timer?

If I do a wait-for-trigger, how do I make it so that it does not register the first cool-down of the occupancy sensor? add a min 4-minute delay or something?

thanks

tulip river
agile forge
#

How about creating an input toggle helper, call it “area occupied”.

Automation to set the toggle’s state and to notify:

  • trigger 1 is motion is detected.
  • trigger 2 is toggle is on for 15 minutes
  • no conditions
  • only action is a choose block:
  • option 1 conditions: input toggle is off
  • option 1 action: turn toggle on, send notification.
  • option 2 conditions: input toggle is on for at least 4 minutes
  • option 2 action: turn toggle off, send notification.
long pewter
#

What about a template binary sensor with delay_off?

tulip river
cedar spade
#

Thanks all!!

cedar spade
tulip river
cedar spade
#

What about power?

#

Battery...in winter

tulip river
#

power... thats another problem 😛

#

i assumed there was power at your current sensors location

cedar spade
#

Not at this location unfortunately

#

Delay off could be good enough

tulip river
#

the templated delay off is a pretty good idea. will go on when is a detection and go off once detection is cleared for x time. any additional trigger will "reset" the time then you just trigger on that sensor going off

#

as that means area has been clear for x time

cedar spade
#

Ok, I'll try this in morning and give it a shot.

Thanks both!

tulip river
#

good luck 🙂

cyan pulsar
#

What if a person goes in, stays like 5 minutes, and then a second person comes in?