I am trying to get a lever micro switch working with my raspberry pi GPIO. This is the lever switch in question.

[![KW11-3Z](https://i.stack.imgur.com/emufv.jpg)](https://i.stack.imgur.com/emufv.jpg)

On the switch it has the model number on one side KW11-3Z and then the other side it says 5a250vac.

I have wired it to COM to GND and NO to GPIO 18. I have tested with a simple push button and this work as expected again wiring to GND and GPIO 18. Therefore I know the python code is correct.

The part I dont know is correct is the switch itself and the wiring.

Here are some images that will help to show how I have things currently.

[![working with tactile switch](https://i.stack.imgur.com/NU5Kg.jpg)](https://i.stack.imgur.com/NU5Kg.jpg)
You can see I have a breadboard with a tactile switch here and this is working as expected. Each time the button is pressed the output on terminal is "Button pressed".

[![not working with micro switch](https://i.stack.imgur.com/2VukE.jpg)](https://i.stack.imgur.com/2VukE.jpg)
Running the same python code I have swapped for the micro switch with using the same pins on raspberry pi of GND and GPIO 18 however each time the lever is pressed it isn't showing anything in terminal, no echo of "Button pressed".

Can anyone please advise what I am doing wrong here. I suspect I have got the configuration of the wires wrong as the code is ok.