Heatwave Pushed Electricity Grid to the Brink of Blackouts