I saw a video about a switchbot door and motion sensor.
When the door sensor is opened and then motion gets sensed someone cam in.
And the other way around someone left.
Curious if this would be possible to create a sensor for those 2 states (come in = true) or (left =true) with a separate motion and contact sensor.
More just curious but let’s say I want to know when someone entered or exited the house from the garage. The garage has a motion sensor by the door and the door has a contact sensor.
‘Door’ being the walk door and not the big garage door.
As the op asked - how would one combine these two into two sensors: enter and exit? I get that the order of triggering is the key but not sure the clean way to go boi it.
I am sure this has been covered numerous times but my search terms are lacking.
This will report entry if when the walk door is opened the garage door changed state in the last 5 minutes, and exit if when the garage door is opened the walk door changed state in the last 5 minutes, otherwise unknown
Obviously this needs adjusted to suit your actual entities, and the timeframes you’re working with, plus it’s not that flexible. A better solution may be an input_text and an automation that uses wait_for_trigger.
The time comparison makes sense but I also like the idea of the wait_for_trigger as I was forgetting that ability.
I will play around with that some.
It would seems logical that when entering through the garage, the garage motion sensor, even though right by the entry door, would pick up the motion well (>1 sec) before the door open/close switch gets activated.
I just wonder when coming the other way if the door switch will get reported before the motion picks up the person or if there could be a chance of it occurring out of order. Sensor placement may have to be adjusted.
Thanks again