The state’s gas-fired plants were “critical” during the worst of the heat wave, but some were unavailable at times, California’s grid operator said in a report.