Home Assistant configuration files.
Some detailed information about setting various parts of this up on DIY Futurism.
My HA is an Hassbian install on a Raspberry Pi 3 with an GoControl Z-Wave/Zigbee USB stick.
Running HA version: 0.50.1
I use a python script to filter 'home' and 'not_home' signals by platform.
This script creates a new device_tracker with the most recent information and state, using the most platforms in the most reliable way.
Position in house is located using variable.last_motion