With inspiration from the excellent The Stock Pot, and in particular the full tutorial for how to Make Your Own Universal Remote (ESPHome + Home Assistant), I’m slowly starting to wrap my head around Home Assistant and ESP8266/ESP32. I’ve managed to wire up a button to my ESP8266 and I can register single, double, or long presses on said button in Home Assistant.
There is a lot more work to be done in Home Assistant itself before I can get anything proper out of this, but I’m making progress and having fun.