uart:
  - id: uart_ld2420
    tx_pin: 17
    rx_pin: 16
    baud_rate: 9600

ld2420:
  id: my_ld2420

binary_sensor:
  - platform: ld2420
    has_target:
      name: Presence

button:
  - platform: ld2420
    apply_config:
      name: Apply Config
    factory_reset:
      name: Factory Reset
    restart_module:
      name: Restart Module
    revert_config:
      name: Undo Edits

number:
  - platform: ld2420
    presence_timeout:
      name: Detection Presence Timeout
    min_gate_distance:
      name: Detection Gate Minimum
    max_gate_distance:
      name: Detection Gate Maximum
    gate_move_sensitivity:
      name: Move Calibration Sensitivity Factor
    gate_still_sensitivity:
      name: Still Calibration Sensitivity Factor
    gate_0:
      move_threshold:
        name: Gate 0 Move Threshold
      still_threshold:
        name: Gate 0 Still Threshold
    gate_1:
      move_threshold:
        name: Gate 1 Move Threshold
      still_threshold:
        name: Gate 1 Still Threshold
    gate_2:
      move_threshold:
        name: Gate 2 Move Threshold
      still_threshold:
        name: Gate 2 Still Threshold
    gate_3:
      move_threshold:
        name: Gate 3 Move Threshold
      still_threshold:
        name: Gate 3 Still Threshold
    gate_4:
      move_threshold:
        name: Gate 4 Move Threshold
      still_threshold:
        name: Gate 4 Still Threshold
    gate_5:
      move_threshold:
        name: Gate 5 Move Threshold
      still_threshold:
        name: Gate 5 Still Threshold
    gate_6:
      move_threshold:
        name: Gate 6 Move Threshold
      still_threshold:
        name: Gate 6 Still Threshold
    gate_7:
      move_threshold:
        name: Gate 7 Move Threshold
      still_threshold:
        name: Gate 7 Still Threshold
    gate_8:
      move_threshold:
        name: Gate 8 Move Threshold
      still_threshold:
        name: Gate 8 Still Threshold
    gate_9:
      move_threshold:
        name: Gate 9 Move Threshold
      still_threshold:
        name: Gate 9 Still Threshold
    gate_10:
      move_threshold:
        name: Gate 10 Move Threshold
      still_threshold:
        name: Gate 10 Still Threshold
    gate_11:
      move_threshold:
        name: Gate 11 Move Threshold
      still_threshold:
        name: Gate 11 Still Threshold
    gate_12:
      move_threshold:
        name: Gate 12 Move Threshold
      still_threshold:
        name: Gate 12 Still Threshold
    gate_13:
      move_threshold:
        name: Gate 13 Move Threshold
      still_threshold:
        name: Gate 13 Still Threshold
    gate_14:
      move_threshold:
        name: Gate 14 Move Threshold
      still_threshold:
        name: Gate 14 Still Threshold
    gate_15:
      move_threshold:
        name: Gate 15 Move Threshold
      still_threshold:
        name: Gate 15 Still Threshold

select:
  - platform: ld2420
    operating_mode:
      name: Operating Mode

sensor:
  - platform: ld2420
    moving_distance:
      name: "Moving distance (cm)"

text_sensor:
  - platform: ld2420
    fw_version:
      name: LD2420 Firmware