A liquid sprayer is provided. This liquid sprayer comprises a bottle having an opening and a sprayer housing attached to the bottle. This sprayer housing includes an electric motor, a voltage source for powering the electric motor, a pump driven by the motor, a switch for completing an electrical circuit, a nozzle mechanism attached to the sprayer housing for spraying a liquid. The liquid sprayer also comprises a venting mechanism. This venting mechanism comprises a vent housing having an inner surface and an outer surface, and a translating piston disposed in the vent housing.