1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

Add Ld2410 Support (#3919)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
sebcaps
2023-02-06 23:47:50 +01:00
committed by GitHub
parent 6b7b076875
commit 0bf6e21e1a
8 changed files with 747 additions and 0 deletions

View File

@@ -222,6 +222,12 @@ uart:
rx_pin: GPIO26
baud_rate: 115200
rx_buffer_size: 1024
- id: ld2410_uart
tx_pin: 18
rx_pin: 23
baud_rate: 256000
parity: NONE
stop_bits: 1
ota:
safe_mode: true
@@ -1200,6 +1206,17 @@ sensor:
pressure:
name: "MPL3115A2 Pressure"
update_interval: 10s
- platform: ld2410
moving_distance:
name: "Moving distance (cm)"
still_distance:
name: "Still Distance (cm)"
moving_energy:
name: "Move Energy"
still_energy:
name: "Still Energy"
detection_distance:
name: "Distance Detection"
esp32_touch:
setup_mode: false
@@ -1461,6 +1478,13 @@ binary_sensor:
id: close_sensor
- platform: template
id: close_obstacle_sensor
- platform: ld2410
has_target:
name: presence
has_moving_target:
name: movement
has_still_target:
name: still
pca9685:
frequency: 500
@@ -3143,6 +3167,19 @@ button:
on_press:
midea_ac.power_toggle:
ld2410:
id: my_ld2410
uart_id: ld2410_uart
timeout: 150s
max_move_distance: 6m
max_still_distance: 0.75m
g0_move_threshold: 10
g0_still_threshold: 20
g2_move_threshold: 20
g2_still_threshold: 21
g8_move_threshold: 80
g8_still_threshold: 81
lcd_menu:
display_id: my_lcd_gpio
mark_back: 0x5e