iBeacon to room presense

I recently flashed all my ESP32 to BT Proxy and I would like to use the iBeacons to track the room presence. I have everything I need but I don’t know how to do it, so I’m looking for your help.

If I look at my iBeacon it only show if I am at home or not at home but in it’s attributes it show what ESP32 it is connected to (source attribute).
As I know the source (the ESP32) and I know the area of that ESP32… then I know the room I’m in.

How can we build something like:

IF iBeacon distance is not null (so it is connected to an ESP32 Proxy) then room is equal to Area of the device that is in source attribute of my iBeacon?

All is there to build room presence from iBeacon + ESP32 Proxy, but I don’t have the knowledge to make it happen.