A multi-function controller for a water heater is advanced comprising a control panel and a plurality of sensors that monitor a variety of functions that impact the operation of a water heater. A flammable gas sensor, placed in proximity to the air intake, detects the presence of an unsafe concentration of gas and issues a signal to the control panel, which subsequently discontinues the operation of the burners. Detection of a blocked vent pipe is achieved by a carbon monoxide sensor placed near the draft hood. The control panel is equipped with circuitry which monitors usage of the heater for a specified time period to develop a pattern of use. Subsequent to the monitoring period, the controller will activate the burners a predetermined time prior to an anticipated period of high use. During periods of low use, the controller will decrease the temperature to which the water is to be heated, thereby resulting in a more efficient heater. Non-volatile memory records data from the sensors so that the operation status of the heater may be ascertained subsequent to a power outage. The control panel contains a plurality of visual alarms, each of which corresponds to a sensor. Consequently, repair and maintenance are simplified because the cause of a malfunction is quickly recognized.