I am assuming that is a 24V device being it is a Ubiquiti. Mixing voltages really makes things tough. We use Netonix switches in our tower cabinets for that purpose, and they work really well. However, the models we use are not POE powered, they are direct DC powered. There is one model of Netonix, the WISP Mini, that might be your best best for a small foot print, POE powered, mixed voltage solution. It looks like it would allow a 48V POE power supply, and give you selectable 24V or 48V POE output. This would allow one ethernet up the mast and multiple devices with different voltages at the top. You’ll have to find a small cabinet for it though as it is not an outdoor device. In our experience these devices are easy to manage, but a little fragile and need to be grounded well.