This looks like either a ceramic disk capacitor or a thermistor. Those two are easy to distinguish. Test it with a ohmmeter, and a capacitor will read like a open circuit. A thermistor will have some finite resistance. Then warm it up with your hand and see if it changes. Make sure to not be touching the leads when you measure it warm, else your body resistance will distort the reading. If the resistance changed (probably lower) a decent measurable amount from hand warming, you should be able to see it slowly go back to the original value as it cools back to room temperature.
If this is a capacitor, it is probably in the range of a few pF to a few nF. Thermistors can vary from a few Ω to a few 100kΩ in the same package between models.
It's a very cheap and unreliable version of what's commonly named microswitch. It's unreliable because the two flimsy parts which make up the contacts are unprotected and, well, flimsy. I would suggest you replace it with a real microswitch like
The three solder contacts show that they're changeover contacts: one common, one normally open, and one normally closed.