ESPHome with Sonoff TH16 and Si7021

I have a TH16 with an official SI7021 sensor connected. It works fine through ewlink with original Sonoff FW but not ESPHome. I configured the esphpme config to use the HTU21D Temperature+Humidity Sensor and tried various versions of the ESPhome I²C Bus config, with no luck. Then I found my problem in the link below.

This thread discusses the problem, its to do with the sensor, TH16 use single wire and not I2C. sounds like it can be done by modifying the sensor to be I2C.

Has anyone found another workaround for this issue without the need to re-wire the sensor?

Sonoff uses modified version of sensor. It’s not i2c. It uses simalar to 1wire protocol. To use it with ESPhome you need to specify dht platform for sensor and specify model: si7021.

Thanks Lapatoc, Looks like a good solution, I will try it out.

I have TH10 installed in my bathroom :wink:

I have a AM2303 connected to a Sonoff TH10, which works well here’s a snippet of my config file. Hope it helps. :smiley:

switch:
  - platform: gpio
    pin: GPIO12
    name: "bathroom_fan_relay"
    id: fan_relay

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      inverted: True
    id: bathroom_fan_relay_button
    on_press:
      then:
        - switch.toggle: fan_relay
sensor:
  - platform: dht
    model: AM2302
    pin: GPIO14
    humidity:
      name: "Bathroom Humidity"
      on_value_range:
        - above: 90.0
          then:
            - switch.turn_on: fan_relay
        - below: 90.0
          then:
            - switch.turn_off: fan_relay
    temperature:
      name: "Bathroom Temperature"
    update_interval: 10s
6 Likes

Hi.

Simply use this

sensor:
  - platform: dht
    model: Si7021
    pin: GPIO14
    humidity:
      name: "Humidity"
    temperature:
      name: "Temperature"
    update_interval: 10s'
    ```

Thanks
After pulling my hair down for two days, I found your post, and it works…so cool
it avoids to buy new stuff…