Sweltering workers and residents have been spared mass blackouts after being asked to go easy on air-conditioning and turn off lights and appliances during a heatwave.