Bear is right, no rules in both BS7671 (electrical) and G3 (pressurised water) about switches being too close. They have to be 150mm from gas, nothing for water, apart from any electrical fitting has to be suitable for its surroundings. I wouldnt expect a water tank or pipework to be leaking, they are usually chucked in a 800 wide cupboard where everything is crammed together, so I cannot see the problem, unless they really are right next to a pipe, or its so difficult for maintenance that it could be deemed inaccessible.
I did one on Friday, I couldnt meet the BR requirement of the outlet pipe (D2) being 300mm long, I had to cut it short, it doesnt meet the Building regs requirements, but impossible to do it any other way. (Bear – Tank was 150L, PRV was around a third of the way down, maybe 600mm above the floor, To get enough run off, D2 had to end 200mm above the floor, making it 25cm long.)