Ok I’m going to share with you how I achieve this as its easier to share then explain, I like pictures as you can probably tell.
here is the flow just copy and use the import from clipboard option
[{"id":"95170df2.dc89a","type":"trigger-state","z":"6dcf8230.01070c","name":"Device Tracker 1","server":"4d97f48a.5f4fac","entityid":"","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":330,"y":660,"wires":[["60018fab.875c6"],[]]},{"id":"cd77da06.ff9c68","type":"trigger-state","z":"6dcf8230.01070c","name":"Device Tracker 2","server":"4d97f48a.5f4fac","entityid":"","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":330,"y":860,"wires":[["35866a9a.989f26"],[]]},{"id":"60018fab.875c6","type":"switch","z":"6dcf8230.01070c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"home","vt":"str"},{"t":"eq","v":"not_home","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":620,"y":660,"wires":[["646a67ee.9610b8"],["c4aef439.01c768"]]},{"id":"35866a9a.989f26","type":"switch","z":"6dcf8230.01070c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"not_home","vt":"str"},{"t":"eq","v":"home","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":630,"y":860,"wires":[["c4aef439.01c768"],["5b86fb29.55f734"]]},{"id":"646a67ee.9610b8","type":"api-current-state","z":"6dcf8230.01070c","name":"Everyone Home?","server":"4d97f48a.5f4fac","halt_if":"not_home","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"override_payload":true,"override_data":true,"entity_id":"device_tracker.2","state_type":"str","outputs":2,"x":890,"y":600,"wires":[["b069aedd.afc52"],[]]},{"id":"b069aedd.afc52","type":"api-call-service","z":"6dcf8230.01070c","name":"Set Family Home","server":"4d97f48a.5f4fac","service_domain":"device_tracker","service":"see","data":"{\"dev_id\":\"family\",\"location_name\":\"home\"}","render_data":false,"mergecontext":"","output_location":"payload","output_location_type":"msg","x":1270,"y":740,"wires":[[]]},{"id":"5b86fb29.55f734","type":"api-current-state","z":"6dcf8230.01070c","name":"Everyone Home?","server":"4d97f48a.5f4fac","halt_if":"not_home","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"override_payload":true,"override_data":true,"entity_id":"device_tracker.1","state_type":"str","outputs":2,"x":930,"y":920,"wires":[["b069aedd.afc52"],[]]},{"id":"c4aef439.01c768","type":"api-call-service","z":"6dcf8230.01070c","name":"Set Family Not Home","server":"4d97f48a.5f4fac","service_domain":"device_tracker","service":"see","data":"{\"dev_id\":\"family\",\"location_name\":\"not_home\"}","render_data":false,"mergecontext":"","output_location":"payload","output_location_type":"msg","x":920,"y":760,"wires":[[]]},{"id":"4d97f48a.5f4fac","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open"}]