Check the current light state every time the app resumes
Transition more smoothly between light states