crlogic
September 4, 2022, 12:45pm
3
I’ve seen/used at least three different approaches. Unclear which is “best”. None were quite how you approached the .h linked so you might need to experiment.
Two examples;
lambda: |-
hilink(id(uart_bus)).getmmwConf("get_all");
return {};
or
- lambda: 'static_cast<LD2410 *>(ld2410)->queryParameters();'
Sensor Code
HLK-LD1115J
YAML
esphome:
name: tinypico-mmwave-ld1115h
platform: ESP32
board: esp32dev
includes:
- uart_read_line_sensor_ld1115h.h # https://esphome.io/cookbook/uart_text_sensor.html
# Enable logging
logger:
level: INFO
# Enable Home Assistant API
api:
reboot_timeout: 6h
services:
# Service to send a command directly to the display. Useful for testing
- service: send_command
variables:
cmd: string
then:
- uart.write: !lamb…
1 Like