The motion sensor

Twilight switches consist of a light sensor and a control relay. In this device, the level of illumination is set and when it falls, the sensor signals on the relay that turns on the lighting. If the illumination exceeds this level, then at the signal of the relay sensor will turn off the lighting. You can combine the motion sensor and light sensor, then the light will turn on in the room when a person appears and dusk at dusk.