ok, so, by “nothing happens”, I assume you mean that the binary_sensor isn’t registering as being “on” for the time period that you pushed down your button?
I don’t have anything that’s using the same port as you’re trying to, but here’s an example I have with a reed switch:
Yeah, that’s a good point … now I wonder what’s going on with mine since I normally connect to ground … but, it’s working, so I won’t investigate it further!
-=-=-=-=-=-=-=-=
Of all stupid questions OP, is it possible your switch is bad?
Every now and then that happens to me too where a pin won’t work (or it works, but continuously flaps up and down) (╯°□°)╯︵ ┻━┻)
End of the day, there are a lot of pins on there and as long as you weren’t looking to use all/most of them, you should be good for this project at least!
That’s what I’m wondering. I did find a reddit thread talking about the resistor on that pin causing issues. I was hoping to be able to nail down the reason so I’d know moving forward what to look out for.
From esp32 point of view, there should not be problems.
I don’t know about esphome, but it should be known and documented if you can’t use gpio2 as input.
So still voting wiring problem (or damaged pin).
It’s definitely something with using that pin for input with a button. The same button worked fine on a different pin. The wiring was soldered to the header pins.