This is how I have done it.
Sonoff basic wifi switch re-flashed with tasmota and connected to home assistant. https://www.youtube.com/watch?v=chyVjtYb0EA
Momentary push light switch. https://www.varilight.co.uk/switches-and-sockets/momentary-switches.php
To install, solder two wires on each side of the black switch on the sonoff board.
Wire up at ceiling level by taking the live and neutral into the sonoff and then straight back out to your light pendant.
Then connect the wires that go to your light switch up to the two wires soldered onto the sonoff switch using a connector block.
Finally push everything up into the ceiling, make sure there is an anchor for the light pendant especially if you are hanging a heavy light shade.
Easy wire up at the light switch end, one wire in the common and one wire in L1. All this is basically doing is triggering the switch in the sonoff. It makes the light switch very safe because there is no live going to it. Also, if the sonoff becomes disconnected to the WIFI, the light switch should still work.
I followed this youtube vid: https://www.youtube.com/watch?v=Jdbi2T3IIQg
It will get a bit more complex where you have two way and three way switches but still possible. I have this set up in two rooms, and plan to roll out to the rest of house. Only thing it doesn't do is dimmer - that is a different ball game altogether!