Set "on_boot" color

I’m using the code below to run a CWWW bulb (It starts up on a painfully bright 6500K temp)
Just got the “on_boot” part to work and set the temperature to 2700K automatically. My problem now is that I can’t get the priority right. At 700.0 the bulb has time to light up with 6500K white, and at 800.0 it just doesn’t work. Anyone that can help me figure this out?

esphome:
  name: mono_deltaco_lamp1
  platform: ESP8266
  board: esp01_1m
  
  #Correct white on boot
  on_boot:
    priority: 700.0
    then:
      - light.turn_on: 
          id: mono_deltaco_lamp1
          color_temperature: 2700K
          
wifi:
  ssid: "..."
  password: "..."

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Mono Deltaco 1 Fallback"
    password: "..."

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "..."

ota:
  password: "..."
  
output:
  - platform: esp8266_pwm
    id: output_ww
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_cw
    pin: GPIO14

light:
  - platform: cwww
    name: "Mono Deltaco"
    id: mono_deltaco_lamp1
    warm_white: output_ww
    cold_white: output_cw
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    restore_mode: ALWAYS_ON
    effects:
      - random:
      - strobe:
      - flicker:
1 Like

Well the obvious thing to try is 750, and keep experimenting.

I’ve tried that. The problem is that the delay is caused by the hardware initialization (800.0) and if I set the same priority on the boot code, I’m trying to set variables that don’t exist yet

I found a “solution” to my problem. Changing the restore_mode.

restore_mode: ALWAYS_OFF

This means that the light won’t start until the on_boot automation, leaving me with half a second of delay instead of half a second of white light.

2 Likes

This is great. Just figured I’d say thanks–the “cool white blast” effect of flipping on all our smart lights manually (or more accurately my kids using the physical switches) was getting to be a bit overwhelming.