GPIO Binary Sensor not working in ESPhome after update to 1.17.0 and later

Close your switch/sensor and measure the input voltage to the ESP.

So this might be a dumb answer so apologies. Measuring the voltage across the two contacts on the switch gives 2.56V when open and 0V when closed.

I have the filters inverted in the code so low is then high. When I restart the ESP the sensor goes high and stays there.

Then this is not your issue.

Hmm ok. So if it isnt the voltage then I wonder why the end stop switch is completely unresponsive. The code has not changed beyond recompiling the yaml against the new instance of ESPHome. The last time I updated was when “optimistic” was required on template switches.

I will be taking it apart tomorrow to see if I can identify anything else that is being funny… but no change in output is being read. It could be a pin on the board that has decided to die, but I would have expected other issues if thats the case.

Do you see the binary sensor change state in the log when you operate the end stop?

If not try another GPIO. https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/

I will try another today. It is odd that the sensor is having like it should, but the GPIO isnt reacting like it should. I need to disassemble and do some clost debugging. Will report back later today.

Just taken apart the board and I am unable to use another GPIO pin as they are all in use. I have however got a work around as I recently installed a new board with a brightness sensor in close proximity. Worked out you can easily pass the outputs of a sensor from one board to another, so although not elegant does provide a workable solution and requires no logic change to the function of the switch.

What I want to ask is can you kill the function of a GPIO pin, without killing the board?

I have directly connected the output of D7 to Ground with a flying lead and there are no status changes. All other GPIO pins are functioning correctly. I have another end stop and shorting the GPIO to ground on that switch behaves correctly.

This is an odd one.