The motion sensor will illuminate once motion is detected and automatically turn off 20 seconds after motion was last detected. Like all Mr Beams products, the mini night light is battery powered and does not require any mains wiring.