A room occupancy sensor, a home automation system and a method for automatic control of controlled devices throughout a home. A unique architecture of occupancy sensors includes entry/exit sensors for detecting movement through doorways that separate rooms in the home, room motion sensors for detecting room occupancy, spot sensors to detect occupancy of specific locations within the rooms, and house status sensors to detect the status of certain parameters of the home. A central controller communicates with the sensors and controlled objects over a communications network, where the sensors and controlled objects can be added to the system in a ‘plug and play’ manner. The central controller controls the controlled objects in response to the entry/exit sensors, room motion sensors, spot sensors and the house status sensors. This control is accomplished by assigning each room to one of a plurality of room states, which dictate how the controlled objects are controlled by the central controller. The controlled objects also have controlled object states, which are used by the central controller to control the controlled objects. The room occupancy sensors have a sensitivity that is automatically adjusted based upon temperature measurements, and the number and timing of occupancy detections.