I am fan of, and have used for my own use, the solution @Scott_Barton came up with when dealing with presence. A virtual presence switch that has many different on and off triggers. His post on the topic is here.
Based on his post, I use a combination of IFTTT triggers to determine if I’m home. Life360. Android location service. And which Wi-Fi network my phone is connected to. If you have a large family, this could end up being a number of IFTTT recipes, but it has worked easily for me and there is no code to maintain. (outside of the Universal Device Handler which I have no intention of ever deleting )
My $0.02. I hope it works out for you!
Michael