As it has window and A-K note on pins so I think it may be a light or IR sensor, either photodiode or phototransistor.
You can test it: if you expose it to the sun light and its measured resistance dropped significantly then it is light sensor. Alternatively, if it reacts in that behavior with only IR beam from TV remote controller, so it is IR sensor.