How can I turn off the ESP-01 relay red led?

Hello everybody, I use one ESP-01 relay to turn on/off one lamp, but there’s a red led on the relay that I can’t turn off, and it’s annoying.

descarga

Does everybody know a way (code or even brute force) to disable it, keeping the WiFi relay working?

I use ESPHome inside Home Assistant and this is my code



---
esphome:
  name: lamp
  platform: ESP8266
  board: esp01_1m

# WiFi connection, correct these
# with values for your WiFi.
wifi:
  ssid: xxxxxxxx
  password: xxxxxxx

# Enable logging.
logger:

# Enable Home Assistant API.
api:

# Enable over-the-air updates.
ota:

# Enable Web server.
web_server:
  port: 80

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: lamp
  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: lamp IP
    ssid:
      name: lamp SSID
    bssid:
      name: lamp BSSID

# Sensors with general information.
sensor:
  # Uptime sensor.
  - platform: uptime
    name: lamp uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: Señal WiFi lamp
    update_interval: 60s

# Global to store the on/off state of the chime
globals:
  - id: chime
    type: bool
    restore_value: true
    initial_value: 'true'

# Exposed switches.
switch:
  # Switch to restart the doorbell.
  - platform: restart
    name: lamp restart

  # Switch to turn on/off the chime.
  - platform: gpio
    id: relay
    inverted: true
    name: lamp chime
    pin: GPIO0

  # Switch to turn on/off chime when
  # doorbell button is pushed.
  #
  # It creates a "virtual" switch based
  # on a global variable.
  - platform: template
    name: lamp Chime Active
    id: chime_active
    restore_state: false
    turn_on_action:
      - globals.set:
          id: chime
          value: 'true'
    turn_off_action:
      - globals.set:
          id: chime
          value: 'false'
    lambda: |-
      return id(chime);
# Binary sensor representing the
# Doorbell button push.
binary_sensor:
  - platform: gpio
    id: button
    name: lamp Button
    pin:
      # Connected to GPIO on the ESP-01S.
      number: GPIO2
      mode: INPUT_PULLUP
      inverted: true
    filters:
      # Small filter, to debounce the button press.
      - delayed_on: 25ms
      - delayed_off: 25ms
    on_press:
      # Only turn on the chime when it is active.
      then:
        if:
          condition:
            - switch.is_on: chime_active
          then:
            - switch.turn_on: relay
    on_release:
      # On release, turn of the chime.
      - switch.turn_off: relay

That red led is the power led and it is not wired to esp. It is directly connected to the power up side of the board and so it will light up with power. So it cant be cut out from esphome. you will have to physically remove it. Please see the schematic once before you de-solder it. You can also cover this led with some dark color glue or resin if de-solder is tough. The best option will be to cover it as it might come to use in the future.

2 Likes