Programming a plug with energy meter

I am a beginner with esphome - but its so fun to learn!

First I bought a tuya plug - spent two evenings until I succeeded to convert it to esphome BUT succeeded to immediately loose OTA and Fallback ap password and made some mistake in the internet settings so it wont connect more. Hence its totally bricked but I learned a lot. I know it can be saved using cable but its difficult with a plug that cant be opened. I’ll forget about that.

Then I bought a plug preflashed with Tasmota and I and now succesfully flashed esphome.

Now comes the real challange. How do I get started programming the yaml to get the switch/led working as well as the energy meter. Are there any templates or do people just write from scratch?

ESP8266
Product: Amazon.se

Actually I think I found it myself on this site: Nous A1t | devices.esphome.io

The ota and api passwords are in the yaml you used to flash it.

Yes I know that, but I deleted it from Esphome too. It was before I realized that password exists OTA and backup AP. Device actually works, succeeded to connect to it renaming my home wifi I could connect to it. But since I can’t update the fw it’s kind of useless anyways.

That does not matter at all.

My new device works well, thanks.