So this is my idea of automatic pump and valve control. all goes down to the worm gear, which pushes the valve with an 8 tooth gear attached to it sideways depending of the motor's spinning direction.
This LDD picture shows the idea
And the video shows the real thing.
IMO its very compact and efficient.