What kind of circuit are we talking about ...
The device is taking parasitic power from the circuit it is controlling. This is a bit tricky.
- When the load - usually a light - is on the semiconductor switch in the device must open for some part of the mains cycle so that enough voltage is dropped across the switch to recharge its power-supply capacitor.
- When the load is off a little bit of leakage must be allowed through to power the circuit.
simulate this circuit – Schematic created using CircuitLab
Figure 1. The basic setup. Note there is no true neutral connection to the controller.
Figure 2. A triac controller output waveform. In the off (0 V) periods of the waveform the mains voltage is applied across the switch. Power can be "stolen" to charge up a reservoir capacitor during the off time but a small current must flow through the load.
Note that for this to work the RMS voltage to the load will be reduced as the full wave is no longer being delivered.
Figure 3. An Elektor circuit based on the Siemens LSB0586A touch dimmer. Source: SeekIC.
You might get some ideas by studying the schematic of Figure 3.
- Note that the neutral is not directly connected to the circuit.
- The triac is the actual switch.
- The controller power supply is formed by R2, C2, D1, D2, C3. These give a -5.3 V DC working voltage (relative to ~, the live wire) for the SLB0586A.
- As L~ goes positive C3 charges up to a voltage limited by D1 (Zener) and D2.
You may find that this circuit, designed in the days of incandescent lamps, may not work well with LED and CFL lamps.
Further improvements may be possible with MOSFET switches rather than triac as the mains can be interrupted at any point in the cycle to generate a precise voltage drop across the switch. I too would be interested in a good application note for one of these ICs.