the cheap yellow macro pad has a screen that fades after a while, which is fine, but waking it took increasingly hard repeated taps. worse, the tap always registered — the scene behind the button fired every time — the display just refused to come back fast enough. logically that's stupid: a button you tap to wake should not also trigger while the screen is dark.
the first fix made it worse in a hidden way. the wake code ran inside the touch event call stack, and switching pages plus resuming the graphics engine in the middle of a touch batch hard rebooted the board. the logs told the story: seven reboots in eighty minutes after the flash, versus about nine in nine days before, most of them within seconds of a wake. from the outside it looked like the screen woke fine, because the light restore mode turned everything back on after each reboot, but no click ever published an action — the device was dead or restarting. the worst part is the home assistant driven path never crashed, so the first test round passed while the finger path was still broken.
the whole fix is one line: a ten millisecond delay at the top of the wake script. esphome scripts run on the main loop, and the delay yields out of the touch context, so the page switch and graphics resume run from a clean timer context instead of inside the touch batch. logging went to debug so the next weird thing prints visibly. two flashes later the boot is clean, the assistant driven sleep wake cycle passes, and the real test is a single light tap on a dark screen.