Can I set an LED based on a Home Assistant sensor on_boot?

I have a wifi switch based on esphome (haptek.dk), it has four RGB LED’s.
I have them show status based on Home Assistant sensors.
When I recompile the esphome, the lights are reset, so I have to ‘toggle’ the conditions they react on to have the LED’s activated.
Is there a way to do this on_boot, so they are set correctly from the get-go?

The LED controls looks like this:

  - platform: homeassistant
    id: stairs
    entity_id: light.trappe
    internal: true
    on_state:
      if:
        condition:
          binary_sensor.is_on: stairs
        then:
          - light.turn_on:
              id: led1
              brightness: 50%
              red: 0%
              green: 0%
              blue: 100%
        else:
          - light.turn_on:
              id: led1
              brightness: 30%
              red: 100%
              green: 100%
              blue: 100%

But is the HA even available at boot?
?

Use priority: ESPHome Core Configuration — ESPHome