update temperature and light