Door contact / reed switch

I’m trying to do the same thing. Can someone reference a contact sensor that works with the esp8266. I’d do an esp32, but I already have an 8266 right there

Just google ‘reed switch’.

update to this as either my board never did support this or something has changed in the last 2 years… my config device stanza:

  • platform: gpio
    pin:
    **number: GPIO25
    **inverted: True
    **mode:
    ****input: true
    ****pullup: true
    name: “Utility Rm Door Sensor”
    device_class: door

The * used to force the indenting.
Physical config - reed switch is connected between ground and the GPIO pin using a normally closed contact sensor. When open the voltage has no reason to rise and hence doesn’t trigger an open / closed change… the on-board resistor when called causes the voltage to be pulled up to 3.3v which triggers the change of state.
My boards are NodeMCU Devkit v1.