EXHIBIT 23 CONSENT OF 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 18, 1999, 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, 1998. ERNST & YOUNG LLP Milwaukee, Wisconsin March 17, 1999