Hi,
In the UK, its usual to only have a 3 core wire in the switch housing. The wire carries LIVE into the switch, and the live return comes out of the switch directly to the bulb. The 3rd conductor is the earth.
The whole idea here is that the existing wiring need not be aultered; simply replace the switch with the circuit (the yellow box in the drawing).
Therefore, i assume that the control circuit would need to ensure that at the lowest dim setting, there is still enough voltage to supply the PIC.