Revert back too loop for motion and temperature