ESPhome initial_state: cant get to work

I am trying to get the light to come on at boot so that there is some indication that it is powered up

Can anyone see what I am missing?
I can select the effects or turn the led on through the web portal no problem

|20:36:34|[D]|[light:036]|‘Built-in RGB LED’ Setting:|
|20:36:34|[D]|[light:047]|State: ON|
|20:36:34|[D]|[light:085]|Transition length: 1.0s|

Am I looking in the right direction?
My esphome1.yaml looks like this

esphome:
  name: esphome1

esp32:
  board: esp32-c6-devkitc-1
  flash_size: 8MB
  framework:
    type: esp-idf

# Enable logging
logger:
  level: DEBUG

light:
  - platform: esp32_rmt_led_strip # https://esphome.io/components/light/esp32_rmt_led_strip
    pin: GPIO8
    num_leds: 1
    rmt_channel: 0
    chipset: WS2812
    rgb_order: GRB
    name: "Built-in RGB LED"
    initial_state:
      state: true
      color_mode: RGB
      brightness: 55%
      red: 100%
      blue: 100%
      green: 0%
    effects:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:

captive_portal:
    
# Enable Web Server for easy debugging (optional)
web_server:
  port: 80

I have never tried initial state on a light.
But you could do a on boot turn on.

esphome:
  ....
  ....
  on_boot:
    priority: 601
    then:
      - light.turn_on:
.....

Like this?
The yaml seems invalid

esphome:
  name: esphome1

esp32:
  board: esp32-c6-devkitc-1
  flash_size: 8MB
  framework:
    type: esp-idf

# Enable logging
logger:
  level: DEBUG

light:
  - platform: esp32_rmt_led_strip # https://esphome.io/components/light/esp32_rmt_led_strip
    pin: GPIO8
    num_leds: 1
    rmt_channel: 0
    chipset: WS2812
    rgb_order: GRB
    name: "Built-in RGB LED"
  on_boot:
    priority: 601
    then:
      - light.turn_on:
    initial_state:
      #state: true
      #color_mode: RGB
      brightness: 55%
      red: 100%
      blue: 100%
      green: 0%
    effects:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:

Gives this when I Validate

INFO ESPHome 2024.12.4
INFO Reading configuration /config/esphome1.yaml...
ERROR Error while reading config: Invalid YAML syntax:

while parsing a block collection
  in "/config/esphome1.yaml", line 15, column 3
expected <block end>, but found '?'
  in "/config/esphome1.yaml", line 22, column 3

No…

like this:

esphome:
  name: esphome1
  on_boot:
    priority: 601
    then:
      - light.turn_on:
          id: light
          brightness: 55%
          red: 100%
          blue: 100%
          green: 0%

esp32:
  board: esp32-c6-devkitc-1
  flash_size: 8MB
  framework:
    type: esp-idf

# Enable logging
logger:
  level: DEBUG

light:
  - platform: esp32_rmt_led_strip # https://esphome.io/components/light/esp32_rmt_led_strip
    pin: GPIO8
    num_leds: 1
    rmt_channel: 0
    chipset: WS2812
    rgb_order: GRB
    name: "Built-in RGB LED"
    id: light
    effects:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:

I’m not exactly sure about the syntax to turn on the light but perhaps the color_mode is needed. But I don’t think so

Hmm. That seems to create a new light, I get:

ID 'light' conflicts with the name of an esphome integration, please use another ID name.

Which is why I thought it should be after light is loaded

Then just change the id. It has to have some id so that it knows what light to turn on

esphome:
  name: esphome1
  on_boot:
    priority: 601
    then:
      - light.turn_on:
          id: very_long_id_that_is_probably_not_used
          brightness: 55%
          red: 100%
          blue: 100%
          green: 0%

esp32:
  board: esp32-c6-devkitc-1
  flash_size: 8MB
  framework:
    type: esp-idf

# Enable logging
logger:
  level: DEBUG

light:
  - platform: esp32_rmt_led_strip # https://esphome.io/components/light/esp32_rmt_led_strip
    pin: GPIO8
    num_leds: 1
    rmt_channel: 0
    chipset: WS2812
    rgb_order: GRB
    name: "Built-in RGB LED"
    id: very_long_id_that_is_probably_not_used
    effects:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
Couldn't find ID 'very_long_id_that_is_probably_not_used'. Please check you have defined an ID with that name in your configuration.

I might have to have it in the light that I know works with all the defined platform, pin, chipset and such
This board does not have a status led unfortunately.

Did you change it on both places?

oops, I missed the id line in the light.
Config valid!
Bingo!
Thank you so much!