System and method are provided where an occupancy sensor with a time delay function designed to dim the lights, for example as a warning, after a first period of time has expired without detecting room occupancy. The lights remain dimmed for a second period of time, and then are turned off after a third period of time has expired without detecting room occupancy. If occupancy is detected during the first period of time, the lights will remain on. If occupancy is detected during the second or third period of time, the lights will be turned on to, for example, previous brightness. A night light can be added to, and/or incorporated in, an occupancy sensor which includes the dimmer feature.