Hi,
Looking for a simple way to do the following (Looking at you Kermit
)
I want to send a depart message via MQTT (that’s easy) when there is one event. Eg, open the front door send an MQTT depart message.
But if someone comes home and opens the door (they are arriving home) the trigger for depart is triggered.
If someone is leaving its usual that they will walk towards the front door and activate the motion sensor, then open the door.
So, two conditions in a particular order need to be met for someone to be departing.
Any suggestions on how to create the flow?
Thanks
I find gate node useful. You can open the gate node when device tracker changes from not_home to home, and put a delay node also. Sorry Im on mobile, I can’t post a screenshot…
Thanks. Im not quite sure what it means, so if you get a chance later to show me I would appreciate it.
ok sorry now I think gate will not work here. maybe something like this.
you open the door while motion sensor was on = depart
with the current state node, you can check the state of motion sensor. and use if state to manipulate the output. if the motion sensor is on, then go to second output because you are departing, like this:

i don’t know how it works in real life, if motion sensor is still on when you open the door it will work. but it became off in a milisecond, then it won’t…
“i don’t know how it works in real life, if motion sensor is still on when you open the door it will work. but it became off in a milisecond, then it won’t…”
This is exactly the question I was trying to ask. Motion is activated then goes of then within x seconds the door opens.
There may be a whole bunch of different variables such as motion is on and door opened etc. But I think the principal is the same.
okay… take two…
this gives you 5 seconds to make second condition true.

[{"id":"63b8e201.3687bc","type":"ha-wait-until","z":"294e4f5f.46b07","name":"","server":"e447d17a.16a64","outputs":2,"entityId":"sensor.door","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"5","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"x":340,"y":1140,"wires":[["b6f3e430.86f628"],[]]},{"id":"e447d17a.16a64","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false}]