Top modules

ESPHome LD2410 UART Example: YAML for Home Assistant

A UART block, the ld2410 hub and a handful of entities get an LD2410 into Home Assistant. Copy the YAML, flash an ESP32, then tune the gates for your room.

Revised September 2026
Quick answer

Set up a hardware UART at 256000 baud, no parity, 1 stop bit, add the ld2410: hub with that uart_id, then add binary_sensor, sensor, number and switch entries with platform ld2410. Home Assistant discovers the device through the ESPHome integration.

  • Sensor TX to GPIO16, sensor RX to GPIO17 on a classic ESP32
  • Engineering mode shows per-gate energy for tuning
  • Turn engineering mode off again when you are done
Three rooms of ESPHome1 LD2410C 3-pack
LD2410C 3-pack
Three C modules on 2.54mm pitch, each ready for its own ESP32 node.
  • LD2410C · 3-pack
  • Bluetooth: tune it from your phone
  • 24GHz radar: sees people sitting still
Get the module
Wired-in B boards2 LD2410B Bluetooth module
LD2410B Bluetooth module
B modules with 10-pin cables, so the fine-pitch pads need no soldering.
  • LD2410B · 3-pack
  • Bluetooth: tune it from your phone
  • Cable included
Get the module
Home Assistant, no flashing3 AKAMATIS Presence Sensor v2.2
AKAMATIS Presence Sensor v2.2
An LD2410B and ESP32-C3 in a case, running ESPHome from the first boot.
  • LD2410B · 1 module
  • Bluetooth: tune it from your phone
  • 24GHz radar: sees people sitting still
Get the module

Paste a working uart and ld2410 block

The ESPHome LD2410 component needs two things before any entity works: a UART running at the module's speed and a hub that listens to it. Start from this config for a classic ESP32 and change the pins if your board differs.

esphome:
  name: office-presence

esp32:
  board: esp32dev

logger:
api:
ota:
  - platform: esphome
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

uart:
  id: ld2410_uart
  tx_pin: GPIO17
  rx_pin: GPIO16
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

ld2410:
  id: radar
  uart_id: ld2410_uart
  • tx_pin is the ESP32 pin that transmits, so it goes to the sensor's RX.
  • rx_pin receives, so it goes to the sensor's TX.
  • 256000, NONE and 1 match the module's factory serial settings.

GPIO16 and GPIO17 are UART2 on most ESP32 dev boards, which keeps the default logger on UART0 out of the way. ESPHome recommends hardware UART pins for this component. Power the sensor from the board's 5V pin, not 3.3V; the pinout guide has the pin order for each module version.

Other boards need different pins. On an ESP32-C3, any two free GPIOs can carry the UART; GPIO20 and GPIO21 are a common pair, and the XIAO ESP32-C3 labels them D7 and D6. On an ESP8266 the only full hardware UART is the one the logger uses, so set the logger's baud_rate to 0 and put the sensor on GPIO1 and GPIO3.

Flash, then open the device logs. If the lines are crossed or the baud is wrong, the ld2410 component logs nothing useful and the firmware version sensor stays empty. Swap TX and RX before you suspect the module.

Reference

Every ld2410 entity ESPHome offers

PlatformKeysWhat it does
binary_sensorhas_target, has_moving_target, has_still_target, out_pin_presence_statusPresence states for automations
sensormoving_distance, still_distance, moving_energy, still_energy, detection_distance, light, g0–g8 energiesDistances in cm, energy 0–100, light level
numbertimeout, max_move_distance_gate, max_still_distance_gate, light_threshold, g0–g8 thresholdsTuning values stored on the module
switchengineering_mode, bluetoothPer-gate data on or off; module Bluetooth on or off
selectdistance_resolution, baud_rate, light_function, out_pin_level0.75m or 0.2m gates, port speed, OUT behaviour
buttonfactory_reset, restart, query_paramsModule maintenance
text_sensorversion, mac_addressFirmware version and Bluetooth MAC

Keys as named in ESPHome's LD2410 component documentation. Light and 0.2m resolution depend on the module's firmware.

Expose presence, distance and gate controls

The hub alone reads frames but shows nothing. Each platform block in this config turns part of the data into Home Assistant entities, and you only add the ones you plan to use.

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving target
    has_still_target:
      name: Still target

sensor:
  - platform: ld2410
    moving_distance:
      name: Moving distance
    still_distance:
      name: Still distance
    detection_distance:
      name: Detection distance

number:
  - platform: ld2410
    timeout:
      name: Timeout
    max_move_distance_gate:
      name: Max move gate
    max_still_distance_gate:
      name: Max still gate

Presence is the entity most automations need. It stays on while either a moving or a still target is seen. The distances arrive in centimetres, and ESPHome throttles sensor updates to about once a second by default so the database does not flood.

  • timeout is the no-one delay in seconds; default 5.
  • max_move_distance_gate and max_still_distance_gate run 2–8 and cut off detection beyond that gate.
  • Numbers write straight to the module, so values survive a reboot.

Choose which presence entity drives which automation. Has moving target reacts fast and suits hallway lights. Has still target is what keeps a desk lamp on while you read. ESPHome applies a one-second settle filter to these binary sensors by default, which stops them chattering.

Board comparison

ESPHome-ready boards compared

LD2410C 3-pack LD2410C 3-pack LD2410B Bluetooth module LD2410B Bluetooth module AKAMATIS Presence Sensor v2.2 AKAMATIS Presence Sensor v2.2 LD2410B-P module LD2410B-P module LD2410B Test Kit LD2410B Test Kit
TypeModuleModuleReady-made sensorModuleTest kit
VersionLD2410CLD2410BLD2410BLD2410B-PLD2410B
Pack3-pack3-pack1 module1 module1 module
BluetoothYesYesYesYesYes
Cable—Yes———
Get the module Get the module Get the module Get the module Get the module
Datasheet

Every spec of the top boards

LD2410C 3-pack
LD2410C 3-pack
Model
HLK-LD2410C
Frequency band
24GHz ISM (24.125GHz centre)
Radar type
FMCW (frequency-modulated continuous wave)
Detects
Moving, still, micro-motion, seated and lying people
Maximum sensing distance
5m (some packs quote up to 6m)
Distance resolution
0.75m per gate
Detection angle
±60°
Supply voltage
5V
Logic level
3.3V UART and OUT pin
Interfaces
GPIO (OUT pin) and UART
Default baud rate
256000, 8N1
Header
5 pins at 2.54mm pitch
Module notes →Get the module
LD2410B Bluetooth module
LD2410B Bluetooth module
Model
HLK-LD2410B
Frequency band
24GHz ISM
Radar type
FMCW
Detects
Moving and stationary people, with target distance
Maximum sensing distance
5m
Distance resolution
0.75m per gate
Coverage
±60°
Board size
7 × 35mm
Supply voltage
5V
Logic level
3.3V UART and OUT pin
Interfaces
UART and GPIO (OUT pin)
Default baud rate
256000, 8N1
Module notes →Get the module
AKAMATIS Presence Sensor v2.2
AKAMATIS Presence Sensor v2.2
Radar module
HLK-LD2410B (24GHz mmWave)
Controller
Seeed C3 (ESP32-C3)
Wi-Fi
2.4GHz, external antenna
Firmware
ESPHome, pre-flashed
Platform
Home Assistant required
Detects
Moving and stationary people
Maximum range
6m (20ft) indoors
Sensitivity
Adjustable
Setup
Device hotspot, then enter Wi-Fi credentials
Power
USB-C
Battery
None
Dimensions
0.55 × 1.6 × 1.05in (D × W × H)
Module notes →Get the module

Tune each gate with engineering mode

Engineering mode makes the module report the energy seen in every one of its nine distance gates. That is the data you need to find which gate a fan, radiator or neighbour's hallway is lighting up.

switch:
  - platform: ld2410
    engineering_mode:
      name: Engineering mode

sensor:
  - platform: ld2410
    g2:
      move_energy:
        name: G2 move energy
      still_energy:
        name: G2 still energy
  1. Add move and still energy sensors for the gates you care about, plus g0–g8 move_threshold and still_threshold numbers.
  2. Leave the room empty and switch engineering mode on.
  3. Watch each gate's energy for a few minutes; note the highest value per gate.
  4. Set that gate's threshold a margin above the empty-room peak.
  5. Sit, work and walk in the room to confirm presence still holds, then switch engineering mode off.

With 0.75m gates, gate 0 covers the first 0.75m, gate 1 the next, and so on out to gate 8. A threshold of 100 effectively disables a gate. ESPHome warns that engineering mode costs extra resources, which is why it belongs in a calibration session, not in daily use. Gate size at 0.2m resolution is worked through in setting range and gates.

Tune still thresholds with you sitting motionless in your usual spot. Still energy from a relaxed, breathing person is small, and a threshold set too high drops you after the timeout.
Recommended

Get presence into Home Assistant without flashing

AKAMATIS Presence Sensor v2.2
Best when you want no YAML AKAMATIS Presence Sensor v2.2

The AKAMATIS v2.2 pairs an LD2410B with a Seeed ESP32-C3 and an external Wi-Fi antenna, pre-flashed with ESPHome. Join its hotspot, enter your Wi-Fi details and adopt it in Home Assistant.

Get the module

Show the radar on a Home Assistant card

Once the device is adopted, Home Assistant creates entity IDs from the node name and the entity name. A node called office-presence gives you binary_sensor.office_presence_presence and friends.

A plain entities card plus a history graph is enough to see presence, distance and the timeout at a glance. Paste this into a manual card:

type: vertical-stack
cards:
  - type: entities
    title: Office radar
    entities:
      - binary_sensor.office_presence_presence
      - binary_sensor.office_presence_still_target
      - sensor.office_presence_detection_distance
      - number.office_presence_timeout
  - type: history-graph
    hours_to_show: 12
    entities:
      - binary_sensor.office_presence_presence
  • The history graph shows dropouts: short gaps while you sit still mean a still threshold is too high.
  • Put the gate threshold numbers on a separate tuning dashboard so nobody changes them by accident.
  • Community cards can draw gate energies as bars, but the built-in cards cover daily use.

For automations, trigger lights on the Presence entity turning on and off with a delay of your choosing. Keep the module's own timeout short and put the longer hold in Home Assistant, where you can change it without touching the sensor.

  • Lights on when Presence turns on and the room is dark.
  • Heating setback when Presence has been off for 30 minutes.
  • A notification when a room you expect to be empty reports a still target at night.

If you run several sensors, give each node a clear room name before adoption. Renaming later changes the entity IDs, and every card and automation that refers to them has to follow.

Visualised

Factory move thresholds per gate

Default move thresholds (0–100) from ESPHome's LD2410 documentation. A gate reports motion when its energy rises above the threshold, so lower numbers mean more sensitive.

Skip ESPHome with LD2410 BLE or Tasmota

The B and C modules speak Bluetooth, and Home Assistant has an LD2410 BLE integration that talks to them directly. You need a Bluetooth adapter on the Home Assistant host or an ESPHome Bluetooth proxy in range.

The BLE route suits a sensor powered by a USB charger with no microcontroller at all. It needs the module's Bluetooth left on, which ESPHome users often switch off, and range is limited to what your adapter or proxy covers.

  • LD2410 BLE integration: no flashing, but only for Bluetooth boards and within radio range.
  • Tasmota: some Tasmota builds include an LD2410 driver; you assign the UART pins in the template and get presence and distance, with fewer tuning controls than ESPHome.
  • Ready-made node: the AKAMATIS v2.2 arrives with ESPHome already installed.

For most wired builds ESPHome remains the fullest option, because every gate threshold, the timeout and engineering mode appear as entities. If you prefer the phone for tuning, set thresholds in the HLKRadarTool app first; ESPHome reads them back from the module.

Planning several rooms on different microcontrollers? The board-by-board wiring guide gives pins for the ESP32-C3, D1 Mini and ESP8266.

Troubleshooting

Common snags

Does ESPHome support the LD2410 natively?

Yes. The ld2410 component is part of ESPHome and covers presence, distances, per-gate energies and tuning values over UART.

What does ESPHome LD2410 engineering mode do?

It makes the module report energy for each of its nine gates, which you use to set per-gate thresholds. Switch it off after calibrating, since it costs extra resources.

Can I use the LD2410 with Home Assistant over Bluetooth only?

Yes, with a B or C module and the LD2410 BLE integration, provided a Bluetooth adapter or ESPHome proxy is in range.

Does the ESPHome ld2410 component work with the LD2410S?

No. The S uses a different protocol at 115200 baud, so it needs a community component rather than the built-in one.

Why do my distance readings jump around?

Distance comes from 0.75m gates, so it moves in coarse steps, and it changes as your posture changes. Use Presence for automations and treat distance as a hint.

Next build step

Continue the build

Parts bin

Other boards for the job

Best LD2410