Skip to content

LD2420 documentation outdated — examples use deprecated API that fails to compile on ESPHome 2025.x #5574

@CLeendert

Description

@CLeendert

Feedback

The ESPHome documentation for the LD2420 still shows configuration options that were removed from the component in recent ESPHome versions (2025.x).
As a result, the official YAML examples fail to compile.

The docs still reference advanced LD2420 controls such as:

has_target

presence_timeout

min_gate_distance

max_gate_distance

gate_select

still_threshold

move_threshold

apply_config

factory_reset

restart_module

operating_mode

However, the current LD2420 component in ESPHome 2025.x does not include these fields.
Using the YAML exactly as documented results in compilation errors.

Steps to reproduce

Install ESPHome 2025.x (in Home Assistant or standalone)

Create device with esp32-c3-devkitm-1 board

Copy LD2420 configuration from the documentation into YAML

Attempt to compile

Build fails with the following error:

'class esphome::ld2420::LD2420Component' has no member named 'operating_selector_'
LOG_SELECT was not declared in this scope

Expected behavior

Documentation should reflect the current LD2420 component API

YAML examples should compile without modification

If advanced functions were removed, a breaking-change notice should be documented

Actual behavior

Documentation shows the old API

LD2420 component in ESPHome 2025.x supports only:

presence

moving_distance

stationary_distance

detection_distance

fw_version

All advanced controls referenced in docs are absent from the component

Compilation fails with missing-member errors

URL

https://esphome.io/components/sensor/ld2420/

Additional information

If what I say is true, I will help update the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions