Oh ok, get what was ment, would need a junction box anyway for the connection of the mains so would just fit all wiring etc into that.
Do you think it would be possible to lengthen the cable to the sensor so can mount the box with wiring etc in a more accessible position rather than right above...