either the interior of the latch is froze or you have a broken wire in the door jamb, remove the switch from the latch, but leave it plugged in, and work the switch and see if the light goes on and off, if it works swing the door through the full range of motion and recheck it, if all ok then you most likely need a latch