This reminds us of another DIY automation solution to a wire-related need: a contraption to cut 1,000 pieces of wire.
The WEMOS is programmed using ESPHome and it connects to [HumanSkunk87]’s HomeAssistant to complete the automation. Check out the descriptions in the link for the parts and the code used to run ...