The output should alway be close to 0, 465 or 535; except in the case of direct bright sunlight, when it may reach 1000.
The reading should be 0 when the sensor is a long way from the bed. When it is several mm from the bed, it should rise to 465 but the LED should remain off. The 465 reading warns the firmware that it is close to the bed, so that it can reduce the probing speed. At trigger height the reading should rise to about 535, the LED should come on, and probing should stop. If you then raise the nozzle a fraction of a mm then the reading should drop back to 465 and the LED should go off.
The LED should only be on when the analog reading is about 535. It should be off if the reading is 465.