That will work for some pumps but not all.

Hopefully someone with the electrical knowlege will chime in...