I found the Athom brand and smart plugs while scouring AliExpress for something like that. Eg Espressif based, so I could flash it as I pleased. I’m super shitty with all things Tuya, and at TP-Link for seemingly discontinuing Kasa, but this seemed to fit the bill. How ‘open’ the product was re spec, pins/GPIO, YAML, etc was also fantastic.
Without giving too much away, it’s unfortunately mis-designed in a way that is extremely dangerous. I lodged a support ticket, at first they said something like “that cannot be right” (except in bad Google Translate English), but then I sent screenshot and the literal response I got was;
Thanks for you very important information. I have transfer it to our hardware engineer already and will discuss it urgently. Your order been refund please check your account.
and then the PayPal refund came through. Needless to say, I was very impressed. I am using these plugs, but in very limited and controlled fashion where I am aware of their fault, and can make an informed decision on the risk associated in the specific situation.
If you so choose, you can still buy them at https://www.athom.tech/esphome along with Tasmota, etc, variants, but I cannot warn you strongly enough.
To say nothing else, at least they give a really nice ‘moonlit’ style glow in my workshop at night;
Peace, and video if you want to watch it embedded;