I now do it with a node-red flow. which is alot cleaner. I dont need three automation and a input Boolean to achieve the same thing like I did before.
My flow looks like this…
Trigger node: Triggers when a chosen device tracker current state is “not_home” and previous state was “Work”
Wait Until Node: Wait until “Proximity” of chosen node is below 4. using the proximity component in HA.
Change Node: Sets payload to Message for notification “Dad is nearly home”
Throttle node: Only passes one payload per hour.
Call service: Send notification using your chosen notification service
Node red export
[{"id":"1ab301c8.f9ecfe","type":"ha-wait-until","z":"ea42b334.b6a77","name":"","server":"56e35aef.6eb604","outputs":2,"entityId":"proximity.chris_home","property":"state","comparator":"lte","value":"4","valueType":"num","timeout":"60","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":580,"y":1260,"wires":[["e0039921.a373f8"],[]]},{"id":"5aa1c4cc.b0429c","type":"trigger-state","z":"ea42b334.b6a77","name":"","server":"56e35aef.6eb604","entityid":"device_tracker.life360_#####","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"5eqz1fqjnbx","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"not_home"},{"id":"7fz9nv21srs","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"Work"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":true,"state_type":"str","x":230,"y":1260,"wires":[["1ab301c8.f9ecfe"],[]]},{"id":"e0039921.a373f8","type":"change","z":"ea42b334.b6a77","name":"Set Notification Text","rules":[{"t":"set","p":"payload","pt":"msg","to":"Daddies Nearly Home","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1260,"wires":[["85a59aaf.35d278","1c137b24.5e9485"]]},{"id":"1c137b24.5e9485","type":"throttle","z":"ea42b334.b6a77","name":"","throttleType":"time","timeLimit":"60","timeLimitType":"minutes","countLimit":0,"blockSize":0,"locked":false,"x":1010,"y":1260,"wires":[["8a92e9b9.362ba8"]]},{"id":"8a92e9b9.362ba8","type":"link out","z":"ea42b334.b6a77","name":"Chris Leaving Work Notification","links":["15794538.fcc0ab","f80e3d97.622d9"],"x":1115,"y":1260,"wires":[]},{"id":"56e35aef.6eb604","type":"server","z":"","name":"Home Assistant (####)","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open"}]