Ok, soCable 1 - power from radial
Red - A
Black - B
Yellow/green - D
A is Permanent Live,
B is Neutral.
D is Earth.
So C is Switched Live.Cable 2 - switch
Red - A
Black - C
A bit unusual but alright as long as connected the same at the light.Cable 3 - to light
Red - C
Yellow - D
Blue - B
Is there not an Earth wire in the cable?
Right so Black and Grey are the wrong way round.Cable 4 - to fan
Brown - A
Black, sheethed brown - B
Grey sheethed blue - C
Green/yellow - D
It wouldn't matter if they were sleeved with the correct colour.
They could then be swapped at the fan but as it is, the Black and Grey should be swapped at the junction box.
So, Grey sleeved blue to B - Neutral &
Black sleeved brown to C - Switched Live.
You could just check the Isolator to make sure the wires are not crossed there.
Did it stop when you turned on the light?The humidity sensor must work, as today when lights were off fan came on when steam was in room.
Right, so at the fan N & SL are the wrong way round (because of error at junction box).
Do you still have an incandescent light bulb in the room? This could allow the fan to connect to Neutral through the bulb on the SL when the light is OFF, then when the light is ON 230V goes to all terminals at the fan therefore it stops.