My GUESS is that this is a reflective sensor. The clear part is an infrared LED emitter, and the "black" part is an IR-sensitive photo-transistor or photodiode. There are way too many different parts in these packages to guess at a specific part number.
A guess at a circuit, the tab nearest to the devices is common to both, and each of the other two tabs goes to one device. For example, back on the main controller, the common tab goes to GND; the LED tab goes to a current-limiting resistor, and that goes to Vcc; and the photodiode tab goes to a pull-up resistor and a comparator. Or something like that.
Without tests, there is no way to know if the LED is on continuously, pulsed only when a cycle starts, or whatever. The cameras in phones and tablets can see and display the IR light from most tv remotes, and probably can show you if the LED is on. My guess is that it is pulsed to increase the systems immunity to ambient light giving a false reading.
ak