Saving energy in occupied buildings