Fixed the light sensor to reconfigure when the device is plugged in again.