ESPHome on_boot config bricked(?) my LED bulb

Hi,

Recently got ESPHome flashed onto an LED bulb. It was working, but I wanted to avoid the ugly white color that flashes when it first turns on, so I was experimenting with the on_boot command. It was almost working but then I monkeyed with the priority setting, and now it no longer boots correctly (or connects to my network).

Any ideas?

Relevant part of my config:

esphome:
  name: bulb
  platform: ESP8266
  board: esp01_1m
  on_boot:
      priority: 750
      then:
      light.turn_on:
        id: light2
        brightness: 100%
        red: 100%

I’d rather not dink around with trying to reflash it via USB, but I will if I have to.

Is ESPHome supposed to set up a SSID if it comes across errors? Or is there another way to fix this?
Has anyone else experimented with the priority settings on this? What numbers work? (I think I set it too high; it was sort of working as 250.)

You will probably have to.

Any thoughts on the priority options?

I’ve never had any trouble leaving it unspecified so it defaults to -10. That’s my only experience other than what the docs say.

  • 800.0 : This is where all hardware initialization of vital components is executed. For example setting switches to their initial state.
  • 600.0 : This is where most sensors are set up.
  • 250.0 : At this priority, WiFi is initialized.
  • 200.0 : Network connections like MQTT/native API are set up at this priority.
  • -100.0 : At this priority, pretty much everything should already be initialized
1 Like

If I leave it at -10, then it takes a few seconds of blinding default ugly white before it switches over. I’m trying to find the sweet spot.

Well the next options to try (in order) are:

  • After the sensors are set up: (251 to 599)
  • After wifi is set up: (201 to 249)
  • After network connections may be too late but try somewhere between -99 and 199.

There must’ve been a problem flashing it early on over wifi, because I pumped the priority up to 801 and it still flashed properly, the bulb didn’t respond to the initial on_boot command, but it still wasn’t bricked.

The optimal setting I found is to set priority to 700. It goes bright white for less than a second then immediately transitions nicely to warm white.

Would be nice if there was a setting somewhere to set the initial brightness/color settings, instead of relying on the on_boot param. I haven’t found those in the docs, though.