Problems with the Inputpins of the ESP32

Hello there =)

I am currently starting with ESPHome while following this blogpost. Everything went great until I stumbled across one issue I am currently not able to fix:

I am trying to read the input state of pins of the ESP32 and send this data to Homeassistant. This works (as described in the blogpost) for pins 12 and 13. However I’d like to read the state of a third pin but cannot get this to work. I can’t get any other pin to read the state just like pins 12 and 13.

The logical way would be to use pin 11 however esphome says this pin is used for Interrupts. I tried numerous other pins but cant find one that works. Essentially it should just recognize when the pin is connected to ground.

Looking at the documentation for the pinout I can’t figure out why other pins (like 18/D15) don’t work.

This is the config I use

binary_sensor:
  - platform: gpio
    pin:
      number: 13
      inverted: true
      mode:
        input: true
        pullup: true
    name: Bedsensor left
    device_class: occupancy
  - platform: gpio
    pin:
      number: 12
      inverted: true
      mode:
        input: true
        pullup: true
    name: Bedsensor middle
    device_class: occupancy
# A pin for Bedsensor right is missing

Do you have any idea? I’d be really grateful for any clues!

Cheers,
Felix

Well other than ensuring you use the correct GPIOs (see the table lower down on this page: ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials ) you need to show us what you are actually trying.

Just an FYI, we dont know what kind of sensor you are are talking about. You may be right and whatever it is, it calls for a binary_sensor also, you may also be right that it is an active Low sensor but, we dont know what you are doing or using. I see that you linked to a guide but, did you follow it 100% and use the exact same components? Again, we dont know. You havnt told us much except 2 pins work and no others will. Thats a clue i guess, but what no one knows is what hardware you’re using.

FYI… saying you’re using an “esp32” isnt very helpful either. IDK why people do that, its not just you but, its just as vague as saying, “I drive a car”. Its not all that helpful either. Which esp32, what sensors(link, name/model), photos of your wiring never hurt, posting the log output is useful too.

The more actual information and the more details you can provide, then the less people will blurt out random (wrong)guesses and the more people are able to actually help you.