Very confused as to why this isn't working

Ok everyone, First, I want to Thank ALL of you for your help…
I figured out a working config finally!!

esphome:
  name: bathroom-presence
  friendly_name: Bathroom Presence

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "Vcx13szTj4YSavM3kQ7qzMIxdtdNSnyfZkaV4oKkb3U="

ota:
  - platform: esphome
    password: "58fefe151295d120f5573cae40fb6132"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Bathroom fallback Hotspot"
    password: "JUpMdnuNhj9n"

captive_portal:

uart:
  id: uart_ld2450
  tx_pin: GPIO21
  rx_pin: GPIO20
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

ld2450:
  id: bath_room_ld2450
  uart_id: uart_ld2450

binary_sensor:
  - platform: ld2450
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target

sensor:
  - platform: ld2450
    ld2450_id: bath_room_ld2450
    moving_target_count:
      name: "Moving Target"
    still_target_count:
      name: "Still Target"

Yes it works but TOTALLY NO LONGER necessary… Unless you want it in ESPHome but of course after the fact I found this…

HLK-LD2410 in HACS…

@cowboysdude you should obfuscate keys…

1 Like

Or not use the API key. Of over a million installations has anyone ever seen an API hack? To do this a hacker would have to get through your internet firewall, through your WiFi SSID and password, through your Home Assistant name and password, and if they get this far what could a hacker do using the Home Assistant API? Turn off a light?

2 Likes

Not concerned as I’ve totally scrapped that entire thing… went in a totally different direction so those keys are not valid anyway. I do appreciate the input, it’s great info!

The LD2410 is a different presence sensor to the LD2450.

1 Like