Hi Michal,
I don't know, if I understand you 100%...
I try to recap:
There are two lights and only one is to turn on/off by a switch - the other one is turned on all time.
You have two wires: One to the switch and after that to the lamp? The other wire directly to the always on lamp?
Now you want to control both lights with the existing switch?
That means both lights are corresponding on or off? No seperat control wanted?
OK - if it should work as I described, you can install a Shelly2.5 in your Circuit breaker box.
When you use output 1 for the switched lamp and outputl 2 for the always on lamp you have to wire the shelly in this way:
Shelly-N connect to Supply-Neutral
Shelly-L connect to Supply-Life/Phase from the circuit breaker
Shelly-O1 connect to the brown wire in your picture
Shelly-O2 connect to the red wire in your picture
Shelly-SW1 no connection
Shelly-SW2 no connection
Now, if you turn on the switch and the relay of Shelly output 1 (channel 0) is on the lamp should be lighted and a power consumption will be detected by the Shelly. This value can be used to control the second output (O2, channel 1) of the Shelly that manages the red wired lamp.
The configuration of the Shelly should be:
General/both channels: Settings / Mode / Relay
Output1/channel0: Settings / Power on default mode / ON
Output1/channel1: Settings / Power on default mode / OFF
To control the 2. Lamp you have to create two scenes:
Because I do not know anything about the power consumption of the lamp with the switch ich use more than 5 Watt for the level to turn on the 2.lamp and less than 4 Watt to turn it off.
Hope it works with your intstallation.
Now - if the Shelly-O1 is on you can turn on the first lamp with the switch and the Shelly will activate its O2 to lighten the second lamp.
Turning off the switch will shut down the Shelly O2.
Good luck - please give feedback