The switch controls light and fan, how to connect it to those wires?
The old witch was connected in the following manner:
Home Improvement Stack Exchange is a question and answer site for contractors and serious DIYers. It only takes a minute to sign up.Sign up to join this community
The OLD UK color codes are red for hot - and black for neutral.
The NEW EU color codes are brown for hot - and blue for neutral.
You have some of each era of wire in your house. I have no idea what happens after Brexit. For now we'll vote to Remain in EU color codes.
The reason to mark wire will become apparent at the very end, when the hookup instructions are simple.
The red wire with the piff of white paint on it is a hot-at-all-times wire. It needs to be marked with brown tape, e.g. wrap it around the wire a few times maybe 25mm back from the end of the wire.
The red wire with a U-shaped bend gets marked gray*. That is switched-hot to your older lamp.
The blue wire currently "marked" with crumpled brown tape... mark that gray. It is switched-hot to your newer lamp, though I am at a loss as to why they are using blue here - why not brown? What is the brown doing that's so important it can't be used as a hot? How does current to the lamp return? I sense trouble here. I would go over this work with a fine-tooth comb.
Now on the switch, this is a tricky switch since it's designed to be used as a 2-way (USA 3-way). Any 2(3)way can be used as a 1-way, simply by using common and 1 other terminal (not the third). Your switch has very terse labeling saying "in that case, don't use L2". So cover both L2 terminals with tape (just as a reminder, it doesn't serve any electrical purpose).
Now it wires just like your old switch. I would sanity-check whether use of a jumper is OK (to be more precise, landing two wires on one lug), that would either need to be generally allowed by UK/EU Code or specifically allowed by that switch's instructions (meaning it was tested/listed for that use). If it's not allowed, get a 4-terminal jumper block, create another brown jumper (buy more wire, don't cut this short thing in half), and put all four browns (including the red-taped-brown) into the 4-terminal block (including the 2 jumpers not yet connected). Regardless...
If you are very fastidious, you can put the browns to the COM and the grays to L1s, but on a simple switch it really doesn't matter.
* Using the new EU color codes for hot wires: brown, black and gray, avoiding black because it conflicts with your old-wiring neutral wires.