HA helper value not pulled into ESPHome in time for e-Paper rendering

I’m setting up an e-Paper dashboard that only updates once a day, and pulls a number from a home assistant helper. After compiling the screen is rendered, but the number is not loaded from HA until the next time it updates. Like the first rendering of the screen is being done before the variable has been pulled. Since I only want this to update once a day, how can I have it display a helper value from home assistant on the first day after compiling?

I have this in the config:

    sensor:
      - platform: homeassistant
      name: "Teljari"
      id: "dagar" 
      entity_id: input_number.c_counter

and in the display section I have:

it.printf(240,240, id(robotobold), TextAlign::BASELINE_CENTER, "%.0f", id(dagar).state);

First rendering of the screen print nan, second update returns the number.

Is it also nan if you reboot the device?

Perhaps a screen refresh using on_boot with a priority of -100?

Thanks for the pointer, will definitely give this a better read. I was able to make it work by forcing an update whenever the helper value changes, which happens about 5-10 seconds after starting up:

sensor:
      - platform: homeassistant
      name: "Teljari"
      id: "dagar" 
      entity_id: input_number.c_counter
    on_value:
        then:
          - component.update: eink_display