Exhibit (23) (g) Consent of Independent Registered Public Accounting Firm We consent to the reference to our firm under the caption "Experts" in Amendment No. 1 to the Registration Statement on Form S-3 (No. 333-119255) and the related Prospectus of CMS Energy Corporation dated February 1, 2005 for the registration of $150,000,000 of 3.375% Convertible Senior Notes due 2023, Series B and to the incorporation by reference therein of our report dated 29 October 2004 with respect to the financial statements of SCP Investments (No.1) Pty Ltd for the year ended June 30, 2004 included in CMS Energy Corporation's Annual Report (Form 10-K/A) for the year ended December 31, 2003 filed with the Securities and Exchange Commission. /s/ Ernst & Young Perth, Australia 27 January 2005