This is my version:
And yes, the limit node is for what you said. The multiple delays are in case I stay within radius more than I usually do (taking out the trash before going to work, forgetting something inside). That way I get faster departure detection (I use monitor to turn my alarm system on or off, so the sooner I detect departures, the better).
JSON:
[{"id":"4520fd63.2199b4","type":"tab","label":"Presence detection","disabled":false,"info":""},{"id":"fde19650.17b628","type":"server-state-changed","z":"4520fd63.2199b4","name":"Front door opened","server":"56742937.6b70a8","entityidfilter":"binary_sensor.front_door","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":140,"wires":[["a70b03ff.e37c8"],[]]},{"id":"1f9e9e76.a51662","type":"mqtt out","z":"4520fd63.2199b4","name":"","topic":"monitor/scan/depart","qos":"","retain":"","broker":"d279ce4c.26e5d","x":1160,"y":160,"wires":[]},{"id":"887c4700.f6ff08","type":"api-current-state","z":"4520fd63.2199b4","name":"Home status","server":"56742937.6b70a8","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"binary_sensor.home_occupied","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":150,"y":240,"wires":[["4ec0af49.0a861"]]},{"id":"d0b22b69.7238e8","type":"mqtt out","z":"4520fd63.2199b4","name":"","topic":"monitor/scan/arrive","qos":"","retain":"","broker":"d279ce4c.26e5d","x":450,"y":460,"wires":[]},{"id":"a70b03ff.e37c8","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":330,"y":140,"wires":[["887c4700.f6ff08"]]},{"id":"4ec0af49.0a861","type":"switch","z":"4520fd63.2199b4","name":"Check occupancy","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":210,"y":340,"wires":[["21fe11d4.be3b0e"],["d0b22b69.7238e8","a243ea8b.697f28","e1433ed3.3db0e","5844d26f.caf27c"]],"outputLabels":["Occupied","Clear"],"icon":"node-red-contrib-home-assistant-websocket/home.png"},{"id":"4bf52c20.771da4","type":"switch","z":"4520fd63.2199b4","name":"switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"},{"t":"eq","v":"False","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":670,"y":280,"wires":[["b57cb185.6742c","ef33428b.b33d","e42cd57c.e1e9f8","ec6f2bce.f503e8"],["530ffe20.27cd","6831ba98.3621a4","97ebb83b.69c7e8","19a50c1b.871204","fc84843e.e059c8","1e93b2cf.4347cd"]],"outputLabels":["Yes","No"]},{"id":"21fe11d4.be3b0e","type":"api-render-template","z":"4520fd63.2199b4","name":"Both@home?","server":"56742937.6b70a8","template":"{{is_state('binary_sensor.areks_presence', 'on') and is_state('binary_sensor.hildr_presence', 'on')}}","x":440,"y":280,"wires":[["4bf52c20.771da4"]]},{"id":"fd96cc53.e014","type":"mqtt out","z":"4520fd63.2199b4","name":"","topic":"monitor/scan/arrive","qos":"","retain":"","broker":"d279ce4c.26e5d","x":1150,"y":380,"wires":[]},{"id":"275ca477.2a226c","type":"mqtt out","z":"4520fd63.2199b4","name":"","topic":"monitor/scan/depart","qos":"","retain":"","broker":"d279ce4c.26e5d","x":1160,"y":480,"wires":[]},{"id":"23940a94.e7e3e6","type":"comment","z":"4520fd63.2199b4","name":"House is clear. Looking for arrivals.","info":"","x":500,"y":420,"wires":[]},{"id":"3d4701de.89b79e","type":"comment","z":"4520fd63.2199b4","name":"House is occupied...","info":"","x":450,"y":240,"wires":[]},{"id":"df1ae3a.ddc732","type":"comment","z":"4520fd63.2199b4","name":"Both at home, looking for departures.","info":"","x":980,"y":60,"wires":[]},{"id":"9c689b40.29aeb8","type":"comment","z":"4520fd63.2199b4","name":"Just one at home. Scanning both arrival and departure.","info":"","x":1040,"y":300,"wires":[]},{"id":"3148efcf.db792","type":"comment","z":"4520fd63.2199b4","name":"...house occupancy is checked","info":"","x":170,"y":200,"wires":[]},{"id":"530ffe20.27cd","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":540,"wires":[["275ca477.2a226c"]]},{"id":"6831ba98.3621a4","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"180","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":500,"wires":[["275ca477.2a226c"]]},{"id":"97ebb83b.69c7e8","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"120","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":460,"wires":[["275ca477.2a226c"]]},{"id":"19a50c1b.871204","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"90","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":900,"y":420,"wires":[["275ca477.2a226c"]]},{"id":"fc84843e.e059c8","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":900,"y":380,"wires":[["fd96cc53.e014"]]},{"id":"1e93b2cf.4347cd","type":"mqtt out","z":"4520fd63.2199b4","name":"","topic":"monitor/scan/arrive","qos":"","retain":"","broker":"d279ce4c.26e5d","x":930,"y":340,"wires":[]},{"id":"b57cb185.6742c","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"90","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":900,"y":100,"wires":[["1f9e9e76.a51662"]]},{"id":"ef33428b.b33d","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"120","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":140,"wires":[["1f9e9e76.a51662"]]},{"id":"e42cd57c.e1e9f8","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"180","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":180,"wires":[["1f9e9e76.a51662"]]},{"id":"ec6f2bce.f503e8","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":220,"wires":[["1f9e9e76.a51662"]]},{"id":"d9f37897.c8ee88","type":"mqtt out","z":"4520fd63.2199b4","name":"","topic":"monitor/scan/arrive","qos":"","retain":"","broker":"d279ce4c.26e5d","x":610,"y":540,"wires":[]},{"id":"a243ea8b.697f28","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":420,"y":580,"wires":[["d9f37897.c8ee88"]]},{"id":"e1433ed3.3db0e","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":420,"y":540,"wires":[["d9f37897.c8ee88"]]},{"id":"5844d26f.caf27c","type":"delay","z":"4520fd63.2199b4","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":420,"y":500,"wires":[["d9f37897.c8ee88"]]},{"id":"56742937.6b70a8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true},{"id":"d279ce4c.26e5d","type":"mqtt-broker","z":"","name":"Hassio Broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]