Issue with Status LED on ESP32-S2 Mini

Hey folks,

I’m dealing with a quirky little issue. I have set up an LED as a “status_led” on my ESP32-S2 mini. When I have the log open, the LED is off, but when I close the log, it starts to blink. Judging by the blinking speed, it seems to be a WARNING rather than an ERROR.

ESPHome v 2023.12.6

I’ve tried changing the log level to NONE and DEBUG, but the behavior persists. Here’s my code:

logger:
  level: NONE or DEBUG

output:
  - platform: ledc
    pin: GPIO3
    id: led_ota_wait

light:
  - platform: status_led
    output: led_ota_wait
    name: "Status Light"
    id: luz_ota

Additionally, if I check the log from my Linux terminal using the command:

screen /dev/ttyACM0 115200 | tee log.txt

I can see a line when closing the log in ESPHome:

[W][api.connection:104]: ESPHome Logs 2023.12.6 (192.168.1.77): Connection closed

Any bright minds out there have an idea why this might be happening?

Thanks for the help!

Hello and welcome.

Have you added it to Home Assistant as an integration yet?

1 Like

No, I haven’t integrated it into Home Assistant yet. I’m working on the programming of the device and haven’t tackled Home Assistant yet.

Added, and goodbye to the Warning!! Thanks a lot, my friend. :mechanical_arm::blush:

1 Like

Hello,
you can test this, it works for me


status_led:
  pin:
    number: GPIO15
    inverted: True
#https://adafruit.github.io/Adafruit_WebSerial_ESPTool/

substitutions:
  disp_name: s2-mini-bureau
  #internal_name: led_bureau
  internal_name: s2_mini_bureau
  ip_address: !secret ip_S2_bureau
  update_time: 15s


esphome:
  name: ${disp_name}
  #friendly_name: S2 mini Bureau

esp32:
  board: esp32-s2-saola-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "YZB2TqDdQeJSvRhgjgjlgfgYk8PMU/vJ9ZX7SYYQ="

ota:
  password: "f24b03fc24c98464465d35422bd867"

packages:
  device_base: !include tools/device_base.yaml
  wifi: !include tools/ip_fixe.yaml


wifi:
  networks:
  # - ssid: !secret wifi_chalet
  #   password: !secret wifi_chalet_pwd  
  - ssid: !secret wifi_domotique
    password: !secret wifi_domotique_pwd  
  # - ssid: !secret wifi_maison
  #   password: !secret wifi_maison_pwd
  # - ssid: !secret wifi_Me
  #   password: !secret wifi_Me_pwd  

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "S2-Mini-Bureau Fallback Hotspot"
    password: "yyrfKkhkhxV"

captive_portal:

uart:
  tx_pin: 18
  rx_pin: 33
  baud_rate: 256000
  id: ld2410_uart
  parity: NONE
  stop_bits: 1

ld2410:

binary_sensor:
  - platform: ld2410
    has_target: #Présence
      name: Presence
    has_moving_target: #Cible mobile
      name: Moving Target
    has_still_target: #Cible immobile
      name: Still Target
    out_pin_presence_status:
      name: Out Pin Presence Status
  - platform: gpio
    pin: 16

    name: gpio out pin presence
    
switch:
  - platform: ld2410
    engineering_mode:
      name: "engineering mode" 

sensor:
  - platform: ld2410
    light: #intensité lumineuse
      name: light
    moving_distance: #distance cible en mouvement
      name : Moving Distance
    still_distance: #distance cible immobile
      name: Still Distance
    moving_energy: #quantité de mouvement
      name: Move Energy
    still_energy: #quantité d'immobilité ??
      name: Still Energy
    detection_distance: #distance de détection
      name: Detection Distance

number:
  - platform: ld2410
    timeout: #Temps pour passer le binary sensor Présence à faux
      name: timeout
    light_threshold: #Seuil de lumière
      name: light threshold
    max_move_distance_gate: #Distance de détection du mouvemenet 2-8
      name: max move distance gate
    max_still_distance_gate: #Distance de détection d'immobilité 2-8
      name: max still distance gate

button:
  - platform: ld2410
    restart:
      name: "restart"

select:
  - platform: ld2410
    distance_resolution:
      name: Distance Resolution> Blockquote

status_led:
  pin:
    number: GPIO15
    inverted: True