I have the following scenario: I want to have a flow that can distinguish whether the front door (binary_sensor.door) has been opened or not, 5 minutes before a person goes missing. That way i can filter out some false positive results that a person is seen as missing, if for example he switches his cell phone to flight mode, while still being home.
I am using a bayesian sensor to determine whether a perosn is home using the androip app, wifi connection to router (fritzbox) and monitor.script.
However the sensor goes to missing if i enter flight mode. Any ideas?
You should be able to simply get the current state and compare the value of the door and when it was last changed.