Update code to handle lights=0 (all off).