You can use a local variable and a feedback node to accomplish this.
Assuming this is in a while loop my solution is to create a local variable hasLit and a feedback node on the sensor input. When the feedback node output is true and the sensor input is false (the object just passed out of the sensor view) we change hasLit to true. The state of the light will then be true if the sensor is true and not hasLit.