It only took me 4 iterations to make a box!
The button on the bottom right has 2 functions: hold it down before turning on the IPM and it will enable programming mode (allows to upload new sketch from Arduino), once the program is launched the button can be used as a normal input to do something interesting, currently it just forces a screen refresh.
On the backside you can easily access the potentiometer to trim the light detection threshold. The red LEDs of the light sensor module shine through the relatively transparent white PLA plastic. I plan to attach the IPM to the power meter with cable ties like my previous version, thus the protruding flaps on top and bottom.
Inside the enclosure there are some elements that are in contact with electronics, in order to make a snug fit.
I spent a while figuring out how to make the two parts hold together. 3D printing locking clips was no good as they would be solicited in the direction of the deposited material, this is usually a bad idea and will break after a while. In the end I used my 3D printer's inaccuracy to my advantage and printed fitting parts without any margin, this made a very strong press fit.