Theming engine for ESPHome LVGL

Is it possible to change the theme in LVGL at a time of day or with a button? My goal is to have a Day/Night mode button on my screen. This requires changing the background to black the text to white and the colors of most of the text and objects. What’s the best way to accomplish this?

The only way I can see is to do an lvgl.update for each property. This would be a long list.

Basically LVGL does not provide a way to change a theme at run time due to the way that themes are implemented. However changing styles at run time is (now) possible:

There is an example of use in the PR.

1 Like

Wow! Thanks. This is a great update to ESPHome LVGL. I’m adding it to my button library now.