Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in this Registration Statement on Form S-8 of our report dated April 29, 2025 relating to the financial statement of Legence Corp., appearing in Registration Statement No. 333-289629 on Form S-1 of Legence Corp.

 

/s/ Deloitte & Touche LLP

San Francisco, California

September 15, 2025