MotionSensor
Smart HomeNotices a person or an animal moving nearby. Warm bodies give off infrared light we can’t see, and the sensor reacts when that light moves.
How you reach it
Section titled “How you reach it”The MotionSensor class is reached through this attribute of home.
home.motion_sensor
Section titled “home.motion_sensor”Always there.
All the attributes of home are in its table.
Methods
Section titled “Methods”motion_detected()
Section titled “motion_detected()”True while the sensor sees something moving.
motion_detected() -> boolUsed in examples: Web dashboard, Smart house