DISCLAIMER: I have no idea what I'm doing here, just fumbling through and finding things that work. If it helps you, fantastic; if you break something, sorry about that. Proceed with caution.
So I bought an M5StickC PLUS2 a few weeks back, $20 or so, took a couple of weeks to clear customs. Don't really have a specific task in mind for it, or rather now that I'm playing with it it's probably not the right tool for the the task I originally had in mind. But it's still a pretty cool thing, and I'd like to be able to use it in my Home Assistant system through ESPHome.
Trouble is, the only YAML I can find is built for a previous version, the M5StickC. The internals are slightly different -- bigger battery, ESP32-PICO-V3-02 vs ESP32PICO-D4 on the older one, different UART chip, more memory, etc. They both have a lot of the same stuff, like LEDs and buttons and a 135x240 TFT LCD, a microphone, 6-axis MMU, etc., but different processors mean different GPIO pins, so the YAML I have didn't work. So I rolled my own.