"Because it measures in the infrared, it even works in the /dark/"
No, because it's an active rather than passive light sensor, it works in the dark.
Edit: also, the fact that you can see a green dot heavily implies the sensor is operating in the green wavelengths, not in the infrared, but that's secondary.