I need a small transformer (really small, no more than few centimeters), from 230v to 5v so I can fit this with arduino nano in electrical box in the wall.
And yes I know that's dangerous, i am electrician and I will working without power while installing.
Doubt you'll find any mains supply that small, switch-mode or linear.
HI, you are going to need more than a transformer.
Rectifier, Filter Caps, Regulator.
Try and find a good Regulated "wall wart", (I hate that name) ie plugpack.
Tom...
May be modify one of these or something similar:
HERE
MarkT:
Doubt you'll find any mains supply that small, switch-mode or linear.
Mobile phone power supplies are getting down to that size. Find a really small one....