Second the recommendation for esphome, especially if you are trying to do something a little smarter than just a remotely controlled switch. I started with tasmota for my little wastewater pump controller but I found it hard to get my simple if-this-then-that logic to work in tasmota. ESP home on the other hand allows you to write you own C/++ code if you want.