# ESPHome - esp32-S2Mini et LD2410C - 2/2 Code yaml LD2410c

**URL:** <https://forum.hacf.fr/t/esphome-esp32-s2mini-et-ld2410c-2-2-code-yaml-ld2410c/38713>\
**Category:** Entraide Home Assistant\
**Tags:** esphome\
**Created:** [Mars 20, 2024, 1:53 UTC](https://forum.hacf.fr/t/esphome-esp32-s2mini-et-ld2410c-2-2-code-yaml-ld2410c/38713 "2024-03-20T13:53:52Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![WarC0zes](https://forum.hacf.fr/user_avatar/forum.hacf.fr/warc0zes/32/137471_2.png) [@WarC0zes](https://forum.hacf.fr/u/WarC0zes)\
**Post date:** [Mars 20, 2024, 4:09 UTC](https://forum.hacf.fr/t/esphome-esp32-s2mini-et-ld2410c-2-2-code-yaml-ld2410c/38713/4 "2024-03-20T16:09:51Z")

</div>

Salut,  
voici un exemple pour ton S2-Mini et un LD2410:

```auto
esphome:
  name: detecteur-mili-bureau
  friendly_name: Détecteur Mili Bureau

esp32:
  board: lolin_s2_mini
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxx"

ota:
  password: "xxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

captive_portal:

uart:
  tx_pin: GPIO18
  rx_pin: GPIO33
  baud_rate: 256000
  id: uart_1
  parity: NONE
  stop_bits: 1

ld2410:
  - uart_id: uart_1

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: out pin presence status

sensor:
  - platform: ld2410
    light:
      name: light
    moving_distance:
      name : Moving Distance
    still_distance:
      name: Still Distance
    moving_energy:
      name: Move Energy
    still_energy:
      name: Still Energy
    detection_distance:
      name: Detection Distance

```

Regarde le tuto sur ce post [Tuto LD2410 - Détecteur de présence avec ESPHome](https://forum.hacf.fr/t/tuto-ld2410-detecteur-de-presence-avec-esphome/29644) pour configurer plus d’option pour le LD2410.

Un autre exemple avec plus d’option [Code pour esp 32 +ld2410 - #16 par Kiki35](https://forum.hacf.fr/t/code-pour-esp-32-ld2410/34674/16)

---

_[View the full topic](https://forum.hacf.fr/t/esphome-esp32-s2mini-et-ld2410c-2-2-code-yaml-ld2410c/38713)._
