Occupancy Sensors switch lights on when presence is detected and off if absence is detected for a period equal to its programmed timeout.
A daylight dependent version is also available which, during normal periods of occupancy, will switch the lights off whenever there is adequate daylight. Typically this means lights are off during normal daylight hours.