|
ESPHome 2026.11.0-dev
|
Data Structures | |
| class | CalibrateHeadingAction |
| class | CalibrateLevelAction |
| struct | CalibrationPref |
| class | MotionBinarySensor |
| class | MotionComponent |
| struct | MotionData |
| class | MotionEvent |
Enumerations | |
| enum | MotionBinarySensorType : uint8_t { MOTION_BINARY_SENSOR_FACE_UP = 0 , MOTION_BINARY_SENSOR_FACE_DOWN , MOTION_BINARY_SENSOR_FREE_FALL , MOTION_BINARY_SENSOR_MOVING } |
Functions | |
| ESPHOME_LOG_TAG (TAG, "motion.binary_sensor") | |
| PROGMEM_STRING_TABLE (MotionBinarySensorTypeNames, "face_up", "face_down", "free_fall", "moving", "unknown") | |
| ESPHOME_LOG_TAG (TAG, "motion.event") | |
| ESPHOME_LOG_TAG (TAG, "motion") | |
| float | orientation_degrees (const MotionData &data, float flat_threshold) |
| Compute the device's in-plane orientation from the gravity vector. | |
Variables | |
| struct esphome::motion::CalibrationPref | PACKED |
| enum esphome::motion::MotionBinarySensorType : uint8_t |
| Enumerator | |
|---|---|
| MOTION_BINARY_SENSOR_FACE_UP | |
| MOTION_BINARY_SENSOR_FACE_DOWN | |
| MOTION_BINARY_SENSOR_FREE_FALL | |
| MOTION_BINARY_SENSOR_MOVING | |
Definition at line 9 of file motion_binary_sensor.h.
| esphome::motion::ESPHOME_LOG_TAG | ( | TAG | , |
| "motion" | ) |
| esphome::motion::ESPHOME_LOG_TAG | ( | TAG | , |
| "motion.binary_sensor" | ) |
| esphome::motion::ESPHOME_LOG_TAG | ( | TAG | , |
| "motion.event" | ) |
|
inline |
Compute the device's in-plane orientation from the gravity vector.
Returns NAN when the device is flat (lying face up or face down), i.e. when the horizontal component of gravity, normalised by the total acceleration, is below flat_threshold (the sine of the minimum tilt angle). Otherwise returns the rotation snapped to the nearest of 0, 90, 180 or 270 degrees, derived from the direction of the horizontal gravity component.
Definition at line 33 of file motion_component.h.
| esphome::motion::PROGMEM_STRING_TABLE | ( | MotionBinarySensorTypeNames | , |
| "face_up" | , | ||
| "face_down" | , | ||
| "free_fall" | , | ||
| "moving" | , | ||
| "unknown" | ) |
| struct esphome::motion::CalibrationPref esphome::motion::PACKED |