esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
292 stars 36 forks source link

on_boot delayed #5181

Closed VASAPOL closed 11 months ago

VASAPOL commented 11 months ago

The problem

on_boot with priority-100 take 4-7 second to respond after boot(after power off)

Which version of ESPHome has the issue?

2023.11.6

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

No response

What platform are you using?

BK72XX

Board

No response

Component causing the issue

No response

Example YAML snippet

esphome:
  name: ""
  friendly_name: ""
  on_boot:
    priority: -100
    then:
      - light.turn_on:
          id: addr_light
          brightness: 100%
          warm_white: 100%
          cold_white: 0%
          red: 0%
          green: 0%
          blue: 0%

bk72xx:
  board: generic-bk7231t-qfn32-tuya

preferences:
  flash_write_interval: 1min

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "LKUtOW8imvc0Bk3baFdPn1oS/EJO+635gTKVr3ZF8aM="

ota:
  password: "0ecd64c167a72cda2a4da1bc324980b2"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Kitchen Fallback Hotspot"
    password: "12345678"

captive_portal:

bp5758d:
  data_pin: PWM1
  clock_pin: PWM2
light:
  - platform: rgbww
    name: "Living Room Lights"
    id: addr_light
    red: output_red
    green: output_green
    blue: output_blue
    cold_white: output_w
    warm_white: output_ww
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 2000 K
    restore_mode: RESTORE_AND_ON

output:
  - platform: bp5758d
    id: output_red
    channel: 5 # Valid values 1-5 to match OUT1-OUT5
    current: 8 # In mA, valid values 0-90, default 10
  - platform: bp5758d
    id: output_green
    channel: 4 # Valid values 1-5 to match OUT1-OUT5
    current: 8 # In mA, valid values 0-90, default 10
  - platform: bp5758d
    id: output_blue
    channel: 1 # Valid values 1-5 to match OUT1-OUT5
    current: 5 # In mA, valid values 0-90, default 10
  - platform: bp5758d
    id: output_ww
    channel: 2 # Valid values 1-5 to match OUT1-OUT5
    current: 8 # In mA, valid values 0-90, default 10
  - platform: bp5758d
    id: output_w
    channel: 3 # Valid values 1-5 to match OUT1-OUT5
    current: 8 # In mA, valid values 0-90, default 10

Anything in the logs that might be useful for us?

No response

Additional information

No response

ssieb commented 11 months ago

Why did you pick that priority? It will wait until wifi is connected.