Entity does not show up, but sensor works

I added an ESP32 with an LD2420 presence sensor to my Home Assistant through ESPHome. When I try to add card with that entity to my dashboard, it doesn’t show up in the entity listings, so I cannot adjust any of the settings of the sensor. I can go to automation and set it up to turn off the lights, so the sensor is working. I have two other ESP32 with the LD2420 presence sensor that do show the entity. Any ideas as to why it doesn’t show up as an entity?

Not without seeing your ESP code, and ideally the startup logs from the ESP showing the sensor.

The following is the yaml code. The only thing different from the two that I have that are working iare the epphome->name, key, passwords, and ssid, as the 2nd and 3rd were cut and pasted from captive portal to the end. The commented out “friendly_name” was the initial name of the device, as I’d setup several at the same time so that when I went to use them I could change the name at the time, and then update wirelessly.

living-room-presence.yaml

esphome:
  name: "living-room-presence"
  #friendly_name: ESP32-8
  
esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

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

ota:
  password: "xxxx"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Living-Room Hotspot"
    password: "xxxx"

captive_portal:

external_components:
  - source: github://pr#4847
    components: [ ld2420 ]
    refresh: 0s
 
 
esp32_ble_tracker:
    
uart:
  id: ld2420_uart
  tx_pin: GPIO17 
  rx_pin: GPIO16
  baud_rate: 115200
  parity: NONE
  stop_bits: 1

ld2420: 

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

sensor:
  - platform: ld2420
    moving_distance:
      name : Moving Distance

binary_sensor:
  - platform: ld2420
    has_target:
      name: Presence

switch:
  - platform: restart
    name: Restart ESPHome Node

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

number:
  - platform: ld2420
    presence_timeout:
      name: Detection Presence Timeout
    min_gate_distance:
      name: Detection Gate Minimum
    max_gate_distance:
      name: Detection Gate Maximum
    gate_select:
      name: Select Gate to Set
    still_threshold:
      name: Set Still Threshold Value
    move_threshold:
      name: Set Move Threshold Value
button:
  - platform: ld2420
    apply_config:
      name: Apply Config
    factory_reset:
      name: Factory Reset
    restart_module:
      name: Restart Module
    revert_config:
      name: Undo Edits    

As a device trigger, you mean?

Can you see it in the ESP logs? Like this for my motion sensors?

[07:57:06][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Utility room motion'
[07:57:06][C][gpio.binary_sensor:015]:   Device Class: 'motion'
[07:57:06][C][gpio.binary_sensor:016]:   Pin: GPIO4
[07:57:06][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Garage motion'
[07:57:06][C][gpio.binary_sensor:015]:   Device Class: 'motion'
[07:57:06][C][gpio.binary_sensor:016]:   Pin: GPIO5
[07:57:21][D][binary_sensor:036]: 'Utility room motion': Sending state ON
[07:57:32][D][binary_sensor:036]: 'Utility room motion': Sending state OFF

Paste this into Developer Tools / Template and see if you can find it in the resultant list:

{{ states.binary_sensor|map(attribute='entity_id')|list }}

You can try removing the ESPHome device integration and readding it as a generic troubleshooting step.

That can fix weird stuff sometimes.

You could also try adding the card using yaml mode and the entity id.

Where do I find the ESP logs? When I installed the firmware to the microprocessor and it rebooted (and was still on the terminal page), it started spitting out the data from the microprocessor.

It does not show up in the list. I had another ESP32 that I set up the same way, and it doesn’t show up either.

Hi Jim, would it be possible for you to insert your wiring diagram and possibly a picture of the hardware?
I’m struggling with this hardware configuration and all I can think of anymore is that I messed up the connections.
I would greatly appreciate it, thank you!

I deleted and reinstalled ESPHome, and everything works, now. I don’t know what that fixed, but I don’t have to keep fighting it.