EXHIBIT 23 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statements (Form S-8 Nos. 2-72542, 33-19015, 33-21356, 33-37878, 33-56827 and 333-05799) pertaining to the 1980 Long-Term Executive Incentive Compensation Plan and the 1990 Long-Term Executive Incentive Compensation Plan of A. O. Smith Corporation and in the related prospectuses of our report dated January 16, 1997, except for Note 2 as to which the date is January 27, 1997, with respect to the consolidated financial statements and schedule of A. O. Smith Corporation included in this Annual Report (Form 10-K) for the year ended December 31, 1996. Milwaukee, Wisconsin March 24, 1997 ERNST & YOUNG LLP