-
They have a live and neutral in, and a live and neutral out. My bedside lights had 2-core cable so it was very easy, i just cut out the existing manual switch, and wired in the sonoff.
The tasmota flash is quite cool though, allows you to use the button as a standard on/off, and also shows the state change on home assistant. It can also be set to emulate a wemo switch or hue hub, so you can control with alexa, without linking alexa to home assistant.
How do those things work, do you have to wire them inline to the mains cables? Sounds a bit messy.