Added checking for lux state at startup