During the June heatwave, Britain came close to a blackout when low power levels in the electricity grid left the National Energy System Operator scrambling to secure an emergency supply.