7 #ifdef USE_BINARY_SENSOR 13 #ifdef USE_TEXT_SENSOR 217 void setup()
override;
218 void dump_config()
override;
220 void loop()
override;
221 void update()
override;
223 float get_setup_priority()
const override;
226 void set_offset(
float offset_x,
float offset_y,
float offset_z);
230 void set_transform(
bool mirror_x,
bool mirror_y,
bool mirror_z,
bool swap_xy);
232 #ifdef USE_BINARY_SENSOR 234 SUB_BINARY_SENSOR(double_tap)
235 SUB_BINARY_SENSOR(active)
239 SUB_SENSOR(acceleration_x)
240 SUB_SENSOR(acceleration_y)
241 SUB_SENSOR(acceleration_z)
244 #ifdef USE_TEXT_SENSOR 245 SUB_TEXT_SENSOR(orientation_xy)
246 SUB_TEXT_SENSOR(orientation_z)
249 Trigger<> *get_tap_trigger() {
return &this->tap_trigger_; }
281 uint32_t last_tap_ms{0};
282 uint32_t last_double_tap_ms{0};
283 uint32_t last_action_ms{0};
285 bool never_published{
true};
291 void setup_offset_(
float offset_x,
float offset_y,
float offset_z);
294 bool read_motion_status_();
296 int64_t twos_complement_(uint64_t value, uint8_t bits);
void set_range(Range range)
Trigger * get_orientation_trigger()
void set_bandwidth(Bandwidth bandwidth)
This class simplifies creating components that periodically check a state.
bool orientation_interrupt
Bandwidth low_power_bandwidth
Trigger * get_freefall_trigger()
RegOrientationStatus orientation
Trigger * get_double_tap_trigger()
RegOrientationStatus orientation_old
Trigger * get_active_trigger()
RegMotionInterrupt motion_int
Trigger double_tap_trigger_
void set_model(Model model)
SUB_BINARY_SENSOR(tap) SUB_BINARY_SENSOR(double_tap) SUB_BINARY_SENSOR(active) SUB_SENSOR(acceleration_x) SUB_SENSOR(acceleration_y) SUB_SENSOR(acceleration_z) SUB_TEXT_SENSOR(orientation_xy) SUB_TEXT_SENSOR(orientation_z) Trigger<> *get_tap_trigger()
bool double_tap_interrupt
Trigger freefall_trigger_
enum esphome::EntityCategory __attribute__
void set_resolution(Resolution resolution)
Implementation of SPI Controller mode.
bool single_tap_interrupt
Trigger orientation_trigger_
This Class provides the methods to read/write bytes from/to an i2c device.