AHT20
±0.3 °C · ±2 %RH · I²C · 2 to 5.5 V
A small, low-cost I²C sensor with ±0.3 °C and ±2 %RH: the usual upgrade from a DHT22.
Watch out: Fixed address 0x38, so one per bus. In ESPHome, use the aht10 component with variant AHT20.
6 of the 10 features in our table differ between the AHT20 and the SHT31.
±0.3 °C · ±2 %RH · I²C · 2 to 5.5 V
A small, low-cost I²C sensor with ±0.3 °C and ±2 %RH: the usual upgrade from a DHT22.
Watch out: Fixed address 0x38, so one per bus. In ESPHome, use the aht10 component with variant AHT20.
±0.2 °C · ±2 %RH · I²C · 2.15 to 5.5 V
Sensirion’s well-proven sensor: ±0.2 °C, ±2 %RH, two I²C addresses and a supply from 2.15 to 5.5 V.
Watch out: The SHT4x is newer, smaller and more accurate on humidity for the same job.
| Feature | AHT20 | SHT31 |
|---|---|---|
| Temperature accuracy | ±0.3 °C | ±0.2 °C |
| Temperature range | −40 to 85 °C | −40 to 125 °C |
| I²C address | 0x38 | 0x44, 0x45 (set with a pin) |
| Supply | 2 to 5.5 V | 2.15 to 5.5 V |
| Current between readings | 0.25 µA | 0.2 µA |
| ESPHome | aht10 | sht3xd |
Same on both: measures · humidity accuracy · interface · status.
In our table the AHT20 has nothing the SHT31 lacks: choose it for price, availability or a board you already have.
Open the sensor comparison →Tick what your project needs and see which sensor fits best.
AHT20: I²C address, wiring and pull-ups →
SHT31: I²C address, wiring and pull-ups →
The SHT31 offers better temperature accuracy, a wider temperature range, a choice of I²C addresses, and a ready-made configuration in this site’s ESPHome generator; in our table the AHT20 has no advantage of its own, apart from price or availability.
Typical datasheet figures: temperature ±0.3 °C for the AHT20 and ±0.2 °C for the SHT31; humidity ±2 %RH and ±2 %RH. Placement matters as much as accuracy: keep either away from the board’s warm parts.
Often yes: both use I²C. Change the driver or, in ESPHome, the component (aht10 → sht3xd). The I²C address changes too (0x38 → 0x44/0x45).
AHT20 vs DHT22 DHT22 vs SHT31 SHT31 vs SHT4x
Figures from the makers’ datasheets and product pages and the ESPHome documentation, checked in November 2026.