Files
esphome/tests/components/lis2dw12_i2c/common.yaml
T
2026-10-13 09:44:51 +13:00

61 lines
1.2 KiB
YAML

lis2dw12_i2c:
id: lis2dw12_i2c_accel
i2c_id: i2c_bus
range: 4G
power_mode: high_performance
output_data_rate: 100Hz
filter_bandwidth: odr_div_2
low_noise: true
update_interval: 10s
calibration:
offset_x: -0.250
offset_y: -0.400
offset_z: -0.800
transform:
mirror_x: false
mirror_y: true
mirror_z: true
swap_xy: false
on_tap:
- then:
- logger.log: "Tapped"
- then:
- logger.log: "Tapped again"
on_double_tap:
- then:
- logger.log: "Double tapped"
on_freefall:
- then:
- logger.log: "Freefall detected"
on_active:
- then:
- logger.log: "Activity detected"
on_orientation:
- then:
- logger.log: "Orientation changed"
sensor:
- platform: lis2dw12
lis2dw12_id: lis2dw12_i2c_accel
acceleration_x: Accel X
acceleration_y: Accel Y
acceleration_z: Accel Z
text_sensor:
- platform: lis2dw12
lis2dw12_id: lis2dw12_i2c_accel
orientation: Orientation
binary_sensor:
- platform: lis2dw12
lis2dw12_id: lis2dw12_i2c_accel
tap: Single tap
double_tap:
name: Double tap
freefall:
name: Freefall
active:
name: Active
filters:
- delayed_off: 5000ms