A short look at my "WiFi Button" build, a small box with two buttons that controls my lights and uses an ESP32 in deep sleep mode to make a single Li-Ion battery last for months.
You can get the source code shown, a basic wiring diagram and the 3D model of the box at https://github.com/andrewgodwin/ardui...