A water heater includes a water heater main unit and a control circuit unit connected in parallel. The control circuit unit includes a circuit board carrying a water permeation safety control device and a tilt angle sensor switch. The water permeation safety control device includes an auto power-off safety device for automatically interrupts electrical current if water is permeated in the control circuit unit. If the water heater is installed in a wrong direction or tilted over a predetermined angle, the angle sensor switch automatically switches off the circuit.