a water heater has a water container and an element located to heat water in the water container . a sensor located to sense temperature proximate the element and a controller connected to the element and the sensor . the controller is programmed to compare a plurality of sensed temperatures and to disengage the element in the event that the difference between sensed temperatures over a predetermined time period is greater than a predetermined temperature difference and further to engage the element based on a comparison of sensed tempereatures .