Unable to configure SHT20 sensor

Hi.
I’ve been given a SHT20 sensor to be connected to the Raspberry I2C port. I see there’s no component for this specific sensor but exists for SHT31. Unfortunately from the code I see the device has a hardcoded set of i2c addresses (0x44~0x45), unfortunately the SHT20 is fixed to 0x40 so it’s out of range. And from the datasheet it doesn’t seem possible to change it.

From the information I gathered so far it seems that I need to give up. Anyone has a better option? :slight_smile:

Thanks

$5 for a nodemcu?

Why not edit the code at line 34 and replace the 0x44 with 0x40 ?

Just because the code says you can’t use an address doesn’t mean you have to give up.

Unfortunately there’s another check outside the module:

Invalid config for [sensor.sht31]: value must be at least 68 for dictionary value @ data['i2c_address']. Got 64.

Hello @maxxer ,

have you found a solution,

my sht20 is recognize in EspHome with an adress of 0x44, not 0x40 like its hardcoded in the uFire_SHT20 library,

so i modify and include the modify library but it doesnt work better…

Thanks

Hello,

i found the solution…bought a SHT20 and they send me a SHT31…

For the SHT20, it works for esphome and a Wemos D1 mini or Esp32 :
https://community.home-assistant.io/t/sht20-in-esphome-on-d1-mini/366203/5

I’m sorry I cannot recall. Maybe @frompani which worked with me can

1 Like

Finally , We’ve used an sht3x with 0x44 or 0x45 address. So I cant help with sht20,Sorry.

At home I used sht35 with esp8266 and esp32, both with esphome and espeasy (domoticz),works like a charme !
Ciao
F

1 Like

same for me, as i update in my last POST: bought a SHT20 and they send me a SHT31…

SHT3x can be add in Esphome without any trouble and work great : https://esphome.io/components/sensor/sht3xd.html

thanks for you reply anyway :wink: