#Define Project substitutions: name: diy-ld2410-sensor device_description: ${name} esphome: name: diy-ld2410-sensor friendly_name: LD2410 sensor comment: DIY LD2410 sensor #Define Board Type esp8266: board: d1_mini # Enable Home Assistant API api: encryption: key: "Home Assistant API KEY 接入Home Assistant 要用 按需更改" logger: baud_rate: 0 # 关闭默认日志串口,避免与 LD2410B 冲突 # OTA配置修复 ota: platform: esphome password: "OTA密码按需更改" captive_portal: wifi: ssid: "WIFISSID" password: "WIFI密码" # Open web port for browser access web_server: port: 80 auth: username: "admin" password: "web访问密码" # UART配置(修改引脚为ESP8266支持的引脚) uart: id: ld2410_uart tx_pin: GPIO1 # TX 默认引脚 rx_pin: GPIO3 # RX 默认引脚 baud_rate: 256000 parity: NONE stop_bits: 1 ld2410: sensor: - 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 (cm)" binary_sensor: - platform: ld2410 has_target: name: Presence has_moving_target: name: Moving Target has_still_target: name: Still Target button: - platform: ld2410 factory_reset: name: "factory reset" restart: name: "restart" query_params: name: query params text_sensor: - platform: ld2410 version: name: "presenece sensor version" mac_address: name: "presenece sensor mac address" switch: - platform: ld2410 engineering_mode: name: "engineering mode" bluetooth: name: control Bluetooth number: - platform: ld2410 timeout: name: timeout light_threshold: name: light threshold max_move_distance_gate: name: max move distance gate max_still_distance_gate: name: max still distance gate g0: move_threshold: name: g0 move threshold still_threshold: name: g0 still threshold g1: move_threshold: name: g1 move threshold still_threshold: name: g1 still threshold g2: move_threshold: name: g2 move threshold still_threshold: name: g2 still threshold g3: move_threshold: name: g3 move threshold still_threshold: name: g3 still threshold g4: move_threshold: name: g4 move threshold still_threshold: name: g4 still threshold g5: move_threshold: name: g5 move threshold still_threshold: name: g5 still threshold g6: move_threshold: name: g6 move threshold still_threshold: name: g6 still threshold g7: move_threshold: name: g7 move threshold still_threshold: name: g7 still threshold g8: move_threshold: name: g8 move threshold still_threshold: name: g8 still threshold