Hotter weather will strain energy grids already facing fuel shortages, as populations seek to cool homes and workplaces.