"GPIO Pin 16 does not support pullup pin mode" error after updating to ESPHome 2025.2.1

I’ve got a wemos D1 mini currently running ESPHome 2024.12.4 and it has a DHT22 sensor connected to D0. This has been running for the last ±month with no issues.

When I try to update it to ESPHome 2025.2.1, I get the error shown below.

Is my best course of action to move the DHT22 to another GPIO pin?

INFO ESPHome 2025.2.1
INFO Reading configuration /config/esphome/server-rack-fans.yaml...
Failed config

sensor.dht: [source /config/esphome/server-rack-fans.yaml:56]
  platform: dht
  
  GPIO Pin 16 does not support pullup pin mode. Please choose another pin.
  pin: D0
  model: DHT22
  humidity: 
    name: Server Rack Humidity
  temperature: 
    name: Server Rack Temperature
    on_value_range: 
      - below: 22.0
        then: 
          - fan.turn_off: intake_fan
          - fan.turn_off: exhaust_fan

1 Like

This is a good reference for choosing suitable pins:

I am surprised this worked prior to the update - what changed I wonder…

It looks like this PR is relevant: DHT platform now supports modules with inbuilt external resistor by deCodeIt · Pull Request #8257 · esphome/esphome · GitHub

@thatguy_za do you use an external pullup resistor, as the documentation states? If so, you may be able to get it working with D0 again by explicitly disabling the internal pullup resistor:

    pin:
      number: D0
      mode:
        input: true
        pullup: false

GPIO16 not supporting internal pullup by design.
Last week DHT platform changed to require pin with internal pullup capabilities.

        cv.Required(CONF_PIN): pins.internal_gpio_input_pullup_pin_schema,

IMHO no idea how it match to declared target to "supports modules with inbuilt external resistor "…

  1. how resistor can be inbuilt & external same time.
  2. if DHT module have inbuilt resistor - why required pin with internal pullup.

So, looks Yo need to use another pin.

Bare sensor or “module”? All modules have ~5k pullup already onboard,
you don’t need additional pullups.

Thanks folks.

It looks like this change is the one that did it - DHT platform now supports modules with inbuilt external resistor by deCodeIt · Pull Request #8257 · esphome/esphome · GitHub

@Karosm, it was a bare sensor, not a module so I’ve moved it over to pin D1 and it seems fine.

1 Like

Just with internal pullup??

I change my code from the first one to the second one, and it works.

From:

    pin: D0
    temperature:

To:

    pin: 
      number: GPIO16
      mode:
        input: true
        pullup: false
    temperature:

I use this board:

esp8266:
  board: nodemcuv2

This work also for me