Skip to content

AHT1x/AHT2x and compatible temperature and humidity sensor~

This feature is not included in precompiled binaries

To use it you must compile your build. Add the following to user_config_override.h to add support for AHT10 or AHT15:

#ifndef USE_AHT1x
#define USE_AHT1x       // [I2cDriver43] Enable AHT10/15 humidity and temperature sensor (I2C address 0x38 or 0x39)
or those lines for AHT20 or AM2301B:
#ifndef USE_AHT2x
#define USE_AHT2x       Enable AHT20 instead of AHT1x humidity and temperature sensor (I2C address 0x38)

AHT10 or AH15 are an I2C temperature and humidity sensor. AHT20 or AM2301B are upgraded versions.


This sensor is incompatible with other I2C devices on I2C bus

Sensor datasheet implicitly says: Only a single AHT10 can be connected to the I2C bus and no other I2C devices can be connected. The AHT20/AM2301B do not suffer from this problem.


AHT1x ESP8266
VCC 3.3V

Tasmota Settings~

In the Configuration -> Configure Module page assign:

  1. GPIOx to I2C SDA (6)
  2. GPIOy to I2C SCL (5)

After a reboot the driver will detect AHT1x automatically and display sensor readings.

webUI readout

and in MQTT topic (according to TelePeriod):



On some I2C sensors, like the AHT25, Tasmota might mistake the sensor for another one using the same address. This can be resolved by disabling the unneeded drivers.

For our example AHT25, the address might get confused with the VEML6070 UV sensor. You can tell Tasmota to use the other driver by issuing the following commands in the console:

  • I2CDriver12 0 to disable the VEML driver
  • I2CDriver43 1 to enable the AHT driver

An overview of all I2C drivers is available in the docs.

Breakout Boards~


Note: The pins on the smaller breakout board with the AHT15 are in a different order: VDD - SDA - GND - SCL See also the datasheet.

AHT10 Datasheet
AHT15 Datasheet