That is why I said put it in an enclosure but I understand your point.
Is there a practical way to hard wire a 12VDC power adapter into the 240v circuit?
Use spade terminals on a wall wart (in an enclosure)?
Use a power supply that has a cord and plug, cut off the plug, and hard wire it...