A person-detection device that automatically configures itself as a motion sensor or an occupancy sensor upon receiving a command from a home security panel or home automation hub.