ESPhome - Fast LED (ws2812b) Frist LED Green light on start

Hi friends … I hope everyone is fine
I came across one problem in my WS2812B led, which is connected with Wemos D1 mini.
In my home power failures is very common, in a day I’m facing 5 to 10-time power failures. when the power is back while Wemos D1 mini is booting up, always first LED in WS2812B strip will on and it goes to green color. every time I have to manually turn on the strip and back to off to clear the green color. Other than that Wemos D1 mini and LED (WS2812B) are working great. for your reference, I’m attaching the Wemos D1 mini wiring and one sample video for your reference. if anyone knows the solution please help me.

Wemos D1 mini and LED (WS2812B) wiring - (i connected some other sensor with this ESP but not included in the image )

ESPhome Code

esphome:
  name: esp_door_bell
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: *******
  password: *******

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
ota:
  password: *******

api:
  password: *******
  services:
    - service: keep_buzzer
      then:
        - rtttl.play: "beep:d=16,o=5,b=100:b"
    - service: play_rtttl
      variables:
        song_str: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return song_str;'

status_led:
  pin: GPIO2
  
sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor buzzer"
    update_interval: 5h
    id: esp_buzzer_wifi
 
binary_sensor:

  - platform: gpio
    pin:
      number: D6
      inverted: True
    name: "door bell"
    filters:
      - delayed_off: 50ms
    
output:
  - platform: esp8266_pwm
    pin: D5
    id: rtttl_out

rtttl:
  output: rtttl_out
  on_finished_playback:
    - logger.log: 'Song ended!'

light:
  - platform: fastled_clockless
    chipset: WS2812b
    pin: D4
    num_leds: 100
    rgb_order: GRB
    name: "Pathway LED"
    effects:
      - addressable_rainbow:
      - addressable_scan:
      - addressable_twinkle:

Reference Video :

Note:
With the same wiring, I’m also running another led Stripe in another place, over there I’m not getting this problem every time. but occasionally I will c the green light ON.

Add an id to your light

light:
  - platform: fastled_clockless
    chipset: WS2812b
    pin: D4
    num_leds: 100
    rgb_order: GRB
    id: pathway_led      ### add this ###
    name: "Pathway LED"
    effects:
      - addressable_rainbow:
      - addressable_scan:
      - addressable_twinkle:

Then try adding this to your esphome core config:

esphome:
  name: esp_door_bell
  platform: ESP8266
  board: d1_mini
  on_boot:
    priority: -100
    then:
      - delay: 1s # may not be required or may need to be a longer delay. Try without this first.
      - light.turn_off: pathway_led

I found the cause of the problem:
with the same type of wiring another device working fine which is in 1.19.2 version (ESPhome)
when i updated it to latest 1.19.4 version (ESPhome) first LED green problem has came.

I think there is a bug in the latest version.

You should open an issue here:

1 Like

did you manage to resolve this? I have the same issue on two esp32 boards (one replaced a esp8266 that was working fine)

Are you sure the pin outs are in the same location and connecting the right pin? I’ve that happen when the data line is to the wrong pin or a bad connection with the ground.