ESPHome does not accept DHT11 on pin16 | PROBLEM SOLVED

Latest release of ESPHome broke my DHT-sensor code:

captive_portal:
sensor:
  - platform: dht
    pin: 16 #is Pin GPIO Pin 16, D0
    temperature:
      name: "Technikraum Temperatur“
    humidity:
      name: "Technikraum Luftfeuchte“
    update_interval: 30s

Error message is: „pin 16 has no pullup, choose another pin“.

I’m using a pull-up resistor for all my dhts. Is there a way to tell ESPHome, that I don’t care about the pin#, because there is a pull-up resistor? I do not want to open 25 boxes, all over the houses and change the hardware, because of a software feature :slight_smile:

I checked the docu without success.

Did you try something like :point_down:

    pin:
      number: GPIO16 #D0
      mode:
        input: true
        pullup: true

to overcome :person_fencing: the software? :thinking:

It’s a “feature” not a bug :face_with_hand_over_mouth:

PS.: You also can make use of the esphome category to reach a wider audience :raised_hands:

Looks like DHT component defaults to have internal pullup, which 16 doesn’t have.
Try:

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

Thanks to you all :slight_smile: This version is working fine:

captive_portal:
sensor:
  - platform: dht
    model: DHT11
    pin:
      number: GPIO16
      mode:
        input: true
        pullup: false 
    temperature:
      name: "Technikraum Temperatur"
    humidity:
      name: "Technikraum Luftfeuchte"
    update_interval: 30s
1 Like