Anybody have working code for a display on an M5Stick?

Spent the last four hours on this. I’m now stuck at an error that says

“AttributeError: module ‘esphome.components.display’ has no attribute ‘DisplayBufferRef’. Did you mean: ‘DisplayBuffer’?”

And want to pull my hair out.

No yaml, no logs, unable to help.

But does this help? ESP32 Water Leak Detector (with notification) — ESPHome

This is exactly the code I’ve tried to use. It doesn’t work. It appears an ESPhome update might have broken it.

Still no logs

I had a similar issue, turns out I had the old display driver in /config/esphome/custom_components and it’s not compatible with new esphome.