20 void setup()
override;
Base class for all binary_sensor-type classes.
bool free_fall_candidate_
static bool is_stationary(const MotionData &data)
True when the device is at rest: total acceleration is close to 1g and (if a gyroscope is present) th...
void set_duration(uint32_t duration)
MotionBinarySensor(MotionComponent *parent, MotionBinarySensorType type)
void set_threshold(float threshold)
MotionComponent * parent_
void dump_config() override
void process_motion_data_(const MotionData &data)
MotionBinarySensorType type_
uint32_t last_event_time_
uint32_t free_fall_start_time_
@ MOTION_BINARY_SENSOR_MOVING
@ MOTION_BINARY_SENSOR_FACE_DOWN
@ MOTION_BINARY_SENSOR_FACE_UP
@ MOTION_BINARY_SENSOR_FREE_FALL