You can set up zones based on your phone's GPS (there is a Home Assistant mobile application that can report data back to the server), or you could set up an automation based on whether your phone is connected to your home's wireless network. Or probably even via some Bluetooth beacon.