Last summer, an extended heat wave in California caused unprecedented high energy demand that threatened electricity outages across the state. There …