An occupancy sensor is an indoor device used to detect the presence of a person. Applications include automatic adjustment of lights or temperature or ventilation systems in response to the quantity of people present. The sensors typically use infrared, ultrasonic, microwave, or other technology. The term encompasses devices as different as PIR sensors, hotel room keycard locks and smart meters. Occupancy sensors are typically used to save energy, provide automatic control, and comply with building codes.[2]