I'm in Oregon, USA, and trying to figure out a code-compliant way of hiding a wall wart (AC/DC transformer) behind a small device (about 3"x3"; if it matters, the specific device is a smart garage door opener).
My (possibly XY) solution to this problem is to put a 2-gang box in the wall with a high/low voltage divider plate, wire in a snap-in outlet (or similarly small outlet) and mount the outlet in the divider plate, and plug in the wall wart (inside the gangjunction box) to this outlet. I'll mount my device to a blank 2-gang plate, and run the 5v barrel connector through the blank plate.
However, my spidey senses say that this would be all sorts of a code violation. But I'm not sure what, if any, violation this would be. I'm separating high/low voltage with the divider plate, and the only wires I'm running through are the low voltage (5V) wires. Would this setup be legal under code?