>>521107407
Kosher light switches use the same principle but by introducing an obstacle between a randomized led light and a sensor.
Basically the switch moves the obstacle and it just happens to block the led light, so the sensor then turns off the light.

It is farcical but as long as enough scholars say it is okay, it is okay.