SACRAMENTO—For most of the year, California’s quest to rid itself of fossil fuels seems on track: Electric cars populate highways while energy from wind, solar, and water provides much of the power for homes and businesses. Then it gets hot, and everyone in the nation’s most populous state turns on their air conditioners at the…