Shelly wave 1 installation

I have a wall switch at the door which triggers a circuit breaker in the fuse box, which turns all the switch on lights on or off. Really nice for switching off all the lights at once, before you go out the door.

Now I’m trying to install a Shelly behind this switch, the switch has a L, 1 and 2 which are connected. Depending on which wire I put in the SW input on the Shelly I can using HA either turn on the lights or turn of the lights, but never both ways.

The hardware switch is working depending on the state of the Shelly switch in combination with which wire I put in the SW.

Also changed some settings of the switch in HA but without any luck.

This is the circuit breaker that switches


And the connector that goes in it.

Also tried to install the Shelly directly below the circuit breaker but with the same problems.

Have had mail contact with Shelly and they sent me the diagram below, but do not answer on further questions. They say I need a separate L wire, but this does not seem possible in my installation.
shellywiring

You could avoid adding extra live wire by replacing with momentary switch

I think my knowledge falls short here. I don’t exactly know what to do in my situation.
In the mean time i found the manual for the motor that switches my circuit breaker. Its a LEGRAND 406291 DX3. On page 3 of the manual you can see the different types of connection that are possible. If i look at my wall switch i think my current situation is the 2th picture in the manual on page 3.
My rocker wall switch on one end.


And the connector to the motor on the other end.