Device_tracker_home find out which device

Hi,
I am using device_tracker_home to see if someone is coming and then open the door and turn on the light.
It works fine, only sometimes the phone loses BT connection or I want to put it in airplane mode, so when it reappears it opens the door.
I am using multiple sensors, BLE+GPS+…
I thought to check, when you increment device_tracker_home to check if the device that incremented device_tracker_home, from when it had decremented to now, has the door status changed.
This would minimize incorrect openings.
But I don’t know how to query about who caused a change in the device_tracker_home

regards
Stefano