LVGL on CYD how to set the checked color of a button after ESP32 started

Hi there!
I set up a CYD with LVGL buttons in a row and can trigger a switch configured in HA. I have no clue how to set the checked color of the button at boot time (of the ESP32) based on the value in home assistant. It is certainly a simple solution, but I just bang my head against the wall. Any ideas welcome!

There is an example in the LVGL cookbook: