Cornwall Council has been awarded £7.8m to help make 400 homes more energy efficient and lower carbon emissions.