this is how i do it…
few input booleans and this:
[{"id":"55d0252a.44c9fc","type":"tab","label":"Flow 13","disabled":false,"info":""},{"id":"f5a44351.71108","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Jim Home?","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jimstatus","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":240,"wires":[[],["b796eb45.509158"]]},{"id":"e0b6b681.a44b38","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Danelle Home?","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.danellestatus","entityidfiltertype":"exact","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":300,"wires":[[],["98f5a1a0.12ba2"]]},{"id":"b796eb45.509158","type":"api-current-state","z":"55d0252a.44c9fc","name":"Nelle Home?","server":"663af70e.88b558","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.danellestatus","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":480,"y":240,"wires":[["2279a6dc.25b92a"],["c009b280.e5c0c"]]},{"id":"98f5a1a0.12ba2","type":"api-current-state","z":"55d0252a.44c9fc","name":"Jim Home?","server":"663af70e.88b558","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jimstatus","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":480,"y":300,"wires":[["2279a6dc.25b92a"],["e601fc18.22216"]]},{"id":"d72839f0.bfa138","type":"api-call-service","z":"55d0252a.44c9fc","name":"House-Away-mode","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.ha_mode_away","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":910,"y":280,"wires":[[]]},{"id":"2279a6dc.25b92a","type":"api-current-state","z":"55d0252a.44c9fc","name":"Any Guests?","server":"663af70e.88b558","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.house_guests","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":720,"y":280,"wires":[["d72839f0.bfa138"],[]]},{"id":"c2158e6e.c6c23","type":"api-call-service","z":"55d0252a.44c9fc","name":"Away-jimstatus","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jimstatus","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":320,"y":190,"wires":[["b796eb45.509158"]]},{"id":"7726f72f.1e3838","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Jim Leaving","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.jim","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":190,"wires":[[],["c2158e6e.c6c23"]]},{"id":"91214848.93b5c8","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Danelle Leaving","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.danelle","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":360,"wires":[[],["693bf11f.0f3ec"]]},{"id":"693bf11f.0f3ec","type":"api-call-service","z":"55d0252a.44c9fc","name":"Away-danstatus","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.danellestatus","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":320,"y":360,"wires":[["98f5a1a0.12ba2","e5411f0b.b7cd3"]]},{"id":"26184aa9.bbb086","type":"api-call-service","z":"55d0252a.44c9fc","name":"turn lights off/etc","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.front_door_light","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":960,"y":200,"wires":[[]]},{"id":"c009b280.e5c0c","type":"time-range-switch","z":"55d0252a.44c9fc","name":"sunsetStart","lat":"33.5598613","lon":"-112.2798811","startTime":"sunsetStart","endTime":"23:59","startOffset":"","endOffset":"","x":770,"y":200,"wires":[["26184aa9.bbb086"],[]]},{"id":"6c8bccce.5b1454","type":"api-call-service","z":"55d0252a.44c9fc","name":"turn lights off/on/etc..","server":"663af70e.88b558","version":1,"debugenabled":true,"service_domain":"light","service":"turn_off","entityId":"light.front_door_light","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":990,"y":350,"wires":[[]]},{"id":"e601fc18.22216","type":"time-range-switch","z":"55d0252a.44c9fc","name":"sunsetStart","lat":"33.5598613","lon":"-112.2798811","startTime":"sunsetStart","endTime":"23:59","startOffset":"","endOffset":"","x":760,"y":360,"wires":[["6c8bccce.5b1454"],[]]},{"id":"e5411f0b.b7cd3","type":"api-call-service","z":"55d0252a.44c9fc","name":"Notify Danelle Left","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"notify","service":"habot","entityId":"","data":"{\"message\":\"Danelle has left\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":540,"y":400,"wires":[[]]},{"id":"ebdeb3cf.dca03","type":"comment","z":"55d0252a.44c9fc","name":"1. Check who is leaving and whos home - set house state.","info":"Check who is leaving and whos home - set house state...","x":260,"y":120,"wires":[]},{"id":"6abbb442.467eec","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Jim Home","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jimstatus","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":570,"wires":[[],["ecca001f.24759"]]},{"id":"89f95a11.ae4108","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Danelle Home","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.danellestatus","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":630,"wires":[[],["ecca001f.24759"]]},{"id":"ecca001f.24759","type":"api-call-service","z":"55d0252a.44c9fc","name":"house-home-mode","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.ha_mode_home","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":530,"y":600,"wires":[[]]},{"id":"da9d017f.8236a","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Jim Arriving","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.jim","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":510,"wires":[["218fc88f.984378"],[]]},{"id":"bc4e1314.75c4c","type":"server-state-changed","z":"55d0252a.44c9fc","name":"Danelle Arriving","server":"663af70e.88b558","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.danelle","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":690,"wires":[["8d6ad021.c91fd"],[]]},{"id":"218fc88f.984378","type":"api-call-service","z":"55d0252a.44c9fc","name":"home-jimstatus","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jimstatus","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":310,"y":510,"wires":[["ecca001f.24759"]]},{"id":"8d6ad021.c91fd","type":"api-call-service","z":"55d0252a.44c9fc","name":"home-danstatus","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.danellestatus","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":310,"y":700,"wires":[["ecca001f.24759","910e1f43.2ef0f"]]},{"id":"910e1f43.2ef0f","type":"api-call-service","z":"55d0252a.44c9fc","name":"Notify Danelle Home","server":"663af70e.88b558","version":1,"debugenabled":false,"service_domain":"notify","service":"habot","entityId":"","data":"{\"message\":\"Danelle has arrived\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":550,"y":700,"wires":[[]]},{"id":"52d7ab09.d17514","type":"comment","z":"55d0252a.44c9fc","name":"2. Check who is arrving and - set house state.","info":"","x":210,"y":450,"wires":[]},{"id":"663af70e.88b558","type":"server","z":"","name":"Home Assistant-mine","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
its not exactly last person home because im only tracking myself and the wife, but youu should be able to go from these ideas… maybe check the last-changed attributes on the person./etc. to late to think about it right now … good luck