The series ofthis time slightly different from the stress of work. The series of can work directly on the AC power network. Light switches are using the main component of TRIAC and LDR. The is very simple and the components were sold in the market. If you want a light reception sensitivity of this can be arranged then the 3.3 MOhm resistor can be replaced with a variable resistor. For more details can be seen from the following series of images.
Light Switch With Triac Circuit
Working principle of Light Switch With Triac circuit is as dimers, but dimers control performed by the reception of light around the LDR. The lower the intensity cayaha received LDR then semkin bright lights. For installation LDR need to be considered so as not exposed to light from the lamp directly.