This has changed my life. By using ATVs for my main television displays in the different levels of my house, my iPhone has become the best universal remote I’ve ever had. And I can access the remote by a 2 second button press. The Apple TV remote even selects the room I am in by itself!! This is my forever Action Button setting.
I’d imagine it knows proximity via Bluetooth. Just a guess.
I think this how that works based on the way the regular ATV remote works. At first I thought it was the proximity to a HomeKit mini, which I also have in each room but I believe Bluetooth is the answer.