I think you might have TWO valves – one to control the water and the other the heating.
In the H/W only setting, power goes via the tank stat Common/Terminal 1, to the H/W valve on the brown input which then operates it (and I think shoves power out to the boiler on Orange). Grey is I think L and Blue is N.
With HEATING on, power will go via the room stat to the HEATING valve in exactly the same manner. The (Orange?) outputs to the boiler from the two valves are commoned together.