An A.O. Smith gas water heater flashing its status light five times is not telling you the water is too hot or the pilot is out. It is the gas control valve reporting that its own temperature sensor has gone bad. The thermistor that measures water temperature is reading open, shorted, or out of range, so the valve no longer trusts it and shuts the burner down. A.O. Smith's support wording is direct: five flashes every three seconds indicates an internal sensor failure. The awkward part, and the reason this code costs more than most, is that on modern gas heaters the sensor is built into the valve, so the real repair usually means replacing the whole gas control valve rather than a cheap probe.
Quick answer
Five flashes on an A.O. Smith gas water heater is a temperature sensor fault: the valve cannot trust its temperature reading and has shut the burner down. Do this in order. First, turn the gas control knob to OFF and shut the gas supply. Second, find the sensor plug where the thermistor harness clips into the gas control valve, unplug it, check for corrosion or bent pins, and reseat it firmly, then relight per the burner door to clear the code. A loose connector can fake this fault for free. Third, if five flashes returns with the plug clean and seated, the thermistor or the valve is genuinely bad. Because the sensor is integral to the valve on these units, the fix is a gas control valve replacement, and that is a licensed-tech job. Check your warranty first.
Where five flashes sits in the A.O. Smith code family
The green light on the gas control valve near the base of the tank is a diagnostic display, and each blink count means something specific. Five is the temperature sensor code. Confirm the count against the chart printed on your heater's own rating label, because a few older or different model lines number their diagnostics slightly differently. Our full A.O. Smith status-light guide maps every pattern. Here is where five lands relative to its neighbors, so you do not confuse it with the over-temperature or valve-fault codes.
One flash every three seconds is the normal heartbeat, nothing wrong. Two flashes is low thermopile voltage, a pilot or thermopile issue and usually a cheap fix. Four flashes is an over-temperature shutdown, the water got too hot. Five flashes, the one you are here for, is the temperature sensor reading out of range. Seven flashes is an internal gas control valve fault. Reading it this way keeps you honest: five and seven both tend to end at the valve, while four is the code most likely to clear from a free fix like backing off the setpoint.
A.O. Smith 5-flash code
A temperature sensor (thermistor) fault. The gas control valve senses that its water temperature probe is reading open, shorted, or out of range, so it can no longer trust the measurement and shuts the main burner down, then flashes the status light five times every three seconds. On modern A.O. Smith and State gas heaters the thermistor is integral to the gas control valve rather than a separate serviceable part, so a confirmed five-flash usually means replacing the valve/thermostat assembly. Before that, the free check is the sensor plug: a loose or corroded connector where the harness meets the valve can throw a five-flash without the sensor actually being dead.

What actually causes a five-flash, cheapest first
The valve does not report a sensor fault at random. Something made the temperature reading untrustworthy, and the causes stack from a free fix to a part swap. Start at the top, because the first item costs nothing and clears a real share of five-flash calls.
The first suspect is the sensor connection, not the sensor. Where the thermistor harness clips into the gas control valve there is a plug, and if that plug is loose, backed out, or has corroded or bent pins, the reading drops out intermittently. The valve sees an out-of-range signal, throws five flashes, and you are looking at a full valve replacement for what is really a dirty connector. Reseating that plug is the single most valuable thing you can do before spending money. Second is the thermistor itself. Sensors drift and fail with age and heat cycling, and a probe reading well outside its normal band will trip the fault every time. Third is the wiring or harness between the sensor and the valve, chafed or pinched. Fourth is the valve's own electronics failing to read a healthy sensor.
Here is the hard truth about the last three. On these units the temperature sensor is sealed into the gas control valve, so a bad thermistor, a bad harness, or bad valve electronics all land at the same repair: replace the gas control valve. That is why five flashes has a reputation as an expensive code. The good news is that the one free cause, the plug, is also the one you can check yourself in a couple of minutes.
What a five-flash repair really costs
The numbers below are the reason you check the plug and the warranty before anything else. A reseated connector costs nothing. A valve replacement is one of the pricier repairs on the heater, and on a tank that is more than about ten years old it is worth weighing the valve cost against replacing the whole heater.
If your heater is inside its warranty and throwing a repeating five-flash, the call to A.O. Smith or the selling dealer comes before the parts store. A covered gas control valve can drop the job from four or five hundred dollars to labor only. If the tank is out of warranty and near the end of its expected life, spending three to five hundred on a valve is money you might rather put toward a new heater.

DIY versus a licensed tech, and where the line is
The split on a five-flash is clean. Cycling the gas knob to reset and reseating the sensor plug are squarely homeowner work; both are quick and neither requires opening a gas connection. Where it stops being DIY is the valve replacement. Swapping a gas control valve means draining the tank, disconnecting the gas line, removing and reinstalling a sealed valve, and relighting, and on a gas appliance that is a licensed-plumber or gas-tech job. Doing it wrong risks a gas leak, which is not a corner to cut. So the honest difficulty rating on this code is call a pro, with one free homeowner check up front that occasionally saves the whole bill.
Keeping five flashes from coming back
A sensor fault is less about maintenance than an over-temperature code is, but a few habits help. Keep the connections dry: moisture and corrosion at the sensor plug are a real cause, so if your heater sits somewhere damp, that is worth watching. Flush the tank once a year on hard water, which will not prevent a sensor from failing but keeps the whole valve running cooler and cleaner and extends the life of every part on the burner assembly. And when you do get a five-flash, resist the urge to keep resetting it. If the plug is clean and seated and the code still returns, the sensor or valve is genuinely bad, and running the heater blind by defeating the safety is never the answer. Get the valve diagnosed and, if it is out of range, replaced.
Frequently asked
What does 5 flashes mean on an A.O. Smith water heater?
Five flashes every three seconds means the gas control valve has detected a temperature sensor fault. The water-temperature probe, the thermistor, is reading open, shorted, or out of range, so the valve can no longer trust its own measurement and shuts the burner down. A.O. Smith's own support page states it plainly: five flashes indicates an internal sensor failure. It is not an over-temperature code and not a pilot code. One flash every three seconds is the normal heartbeat; four flashes is an over-temperature shutdown; five is the sensor itself going bad. The catch on modern gas models is that the temperature sensor is built into the gas control valve, so a genuine five-flash usually points at replacing the valve, not a stand-alone sensor part.
Can I reset the 5-flash code myself?
You can try one clean reset and one free check. To reset, turn the gas control knob to OFF, shut the gas supply valve, wait several minutes, then relight the pilot following the steps printed on the burner door. That knob cycle is the reset on a gas A.O. Smith; there is no red button the way electric models have. While the gas is off, do the one thing that sometimes clears a five-flash for free: find the sensor plug where the thermistor harness clips into the gas control valve, unplug it, look for corrosion or bent pins, and reseat it firmly. A loose or dirty connector can fake a sensor fault. If five flashes comes right back after a proper reset and a reseated plug, the thermistor or the valve is genuinely bad and resetting again will not fix it.
How much does the sensor cost to fix?
This is where five flashes stings. On modern A.O. Smith and State gas heaters the temperature sensor is not sold as a cheap stand-alone part; it is integral to the gas control valve, so the manufacturer's repair is to replace the whole valve/thermostat assembly. The OEM gas control valve commonly runs about $150 to $250 for the part alone. A plumber's visit to drain the tank, swap the valve, and relight typically lands around $300 to $500 all in, more in high-cost metros. Before you buy anything, check the heater's age against its warranty. On most A.O. Smith gas models the gas control valve is a covered part for several years, so a covered valve means you pay for labor, not the part. That warranty check can turn a $400 job into a $150 one.
Is 5 flashes dangerous?
The code itself is the safety system doing its job. A valve that cannot trust its temperature reading should shut the burner down rather than fire blind, and that is exactly what five flashes represents. The danger is not the code, it is what people do to work around it. Never jumper, bypass, or defeat the sensor to force the burner to keep running, because then the valve is heating water with no reliable temperature feedback, which is how you get scalding water or an over-temperature that only the relief valve catches. A five-flash heater is safe to leave shut off until it is repaired. It is not safe to trick into running. If you also see hot water discharging from the temperature and pressure relief valve, shut the gas off and get a licensed tech on it.
Why does 5 flashes keep coming back?
A repeating five-flash is telling you the sensor problem is real, not a fluke. The most common reason it returns after a reset is that the thermistor plug is loose or corroded, so the reading drops out intermittently, throws the code, then recovers, then drops out again. Reseating the plug cures that one. If the connector is clean and firmly seated and the code still cycles back, the thermistor itself has failed or drifted out of range, or the harness is damaged, or the valve's own electronics are bad. All of those end at the gas control valve on these units because the sensor is sealed into it. What a returning five-flash never is, is something a homeowner cures by resetting harder. Once the plug is ruled out, it is a parts problem.
Can I just replace the temperature sensor instead of the whole valve?
On most modern A.O. Smith and State gas heaters, no. The temperature sensor is integral to the gas control valve, meaning it is built into the sealed assembly and not offered as a serviceable stand-alone piece. That is why the manufacturer's remedy for a confirmed five-flash is to replace the gas control valve/thermostat rather than a lone sensor. A few older or different model lines used an external probe, so check the parts diagram for your exact model and serial number before you assume. If your unit genuinely has a separate temperature probe, that is a cheaper swap. For the common integral-sensor valves, the sensor and the control come and go together.
How is 5 flashes different from 4 or 7 flashes?
They point at different faults in the same gas control valve. Four flashes is an over-temperature shutdown, and its fix is often free, backing off the setpoint or flushing sediment. Five flashes is a temperature sensor fault, and the fix is usually a valve replacement because the sensor is built in. Seven flashes is an internal valve fault, which also means replacing the valve. Four is the one most likely to clear for free; five and seven almost always mean parts. The full blink map is on our A.O. Smith status-light guide.