Added method to determine if a light is switched on or off