ESP32 Presence Detection

I want a more reliable way to detect if we're home to trigger certain home automation events. After doing the BLE data experiment it seems like when the phone comes in range it connects to the ESP32 which means I could possible use this to determine if someone is home.

It might be possible to use the ESP32 to scan for devices near by. If I know the mac address of my iPhone then I should be able to determine if it's “home”

https://github.com/nkolban/ESP32_BLE_Arduino/blob/master/examples/BLE_scan/BLE_scan.ino

https://www.instructables.com/id/Nano-ESP32-BLE-Scanner/