ESPHome - Bed occupancy setup

Hi all

Am very new to ESP devices so please excuse any silly questions!

I am following this great guide here to build a bed occupancy sensor using an ESP32.

The issue is the esp 32’s I have have a slightly different pin layout and I can’t work out how these would correlate with mine. (Attached picture below)

So my question is which pins on my ESP device would be suitable, and secondly would the code below still work assuming I update the PIN number or is the platform different on my device too?

binary_sensor:


  • platform: gpio

pin:

  number: 13

  inverted: true

  mode:

    input: true

    pullup: true

name: Bed Occupancy Sensor

device_class: occupancy

filters:

  - delayed_on: 5s

  - delayed_off: 30s

Many thanks!
Marc

There’s a long ongoing thread here that you might want to take a look at, we’ve been making an modifying them for a couple of years :slight_smile:

Also, take a look at these links

ESP32 Pinout
ESP Home Platforms
This will explain better about the pins.

The best way to find how things work is research, I hope the links I’ve provided will help.

1 Like