Get most recent device_tracker to connect? (Unifi Tracker)

I’ve set up the Unifi tracker, and I’d like to get a notification whenever a new device connects. The use case here is to alert me when guests are approaching the house (and connect to our Wi-Fi before they arrive at the door).

Ideally, I’d like to group recently-connected devices together so a single notification can send. “Matt and Sandy just arrived.”

Any ideas?

Love to hear if you find a way to get this working. I was looking for the same thing a while back:

I ended up going with a for loop in a template sensor that iterated through all devices and compared their last_updated or last_changed status.

However … I had about 50 device trackers for all devices and guests that have connected to our home Wi-Fi, so the loop was slow to process and I noticed a substantial performance degradation. Also, the alerts were far too slow for my use case. I abandoned the idea.