I can’t find anything in LVGL that lets me turn a screen on or off. I do see control of the backlight, but I’ve read that even with the backlight off, if anything is displayed on the screen, it can still get burned in.
Is there anything to allow for turning a screen on and off?
I am not aware of being able to turn off the screen but there is a prevent burn in example here. This will help with burn in issue through leaving the screen on.
There are two things to turn off, assuming it’s an LCD screen; the backlight and the LCD itself. The backlight will need to be controlled with a separate light component, details of which will depend on the board.
Turning off the LCD completely is not easy depending on the controller chip and in any case is not supported by most of the ESPHome display drivers, so using a random pattern as per the other response here is the best option. Burn in can occur even with the backlight off.
I had read that in the documentation, but was hoping to find an actual on/off switch. So it looks like I just turn off the backlight (and for this display, that means soldering a wire from a GPIO pin to another connection on the display) and go to random snow.
This is the key point I was trying to find. Since I didn’t find any on/off function in LVGL, my guess is there wasn’t one, but I never saw a clear statement about it. I was just hoping there might be an actual on/off switch.
As for backlight goes you should have light entity in HA. But, regarding shut down i think only options now are pause and resume. Lvgl on esphome is still in pretty early stage - functions are still being added, if i’m not mistaken.