there is a thermostat for incubator for poultry. People generally using this model XH-M452. But this thermostat has a problem, in high humidity environment temperature and humidity sensor of XH m452 not working good. when I opened the case of sensor I saw, AHT21 sensor was inside. Aht21 is I2C interface. I wonder how can I change hdc1080 instead of aht. Both sensor are using I2C interface but I think HDC1080 address is 0x42 but address of AHT21 is 0x38
The problem is not only about the chips having different I2C addresses.
The chips also have different commands how to start measurements and how to read the results.
You need to do two separate things.
First thing is to emulate the original sensor, and it does not matter how you implement it and how you fake the results.
Second thing is to get the needed measurement data from somewhere, no matter from where, but it can come from a different type of sensor.
It might be easier to simply replace the original MCU with your own to run your own software, or do a similar clone of the product. Maybe with Arduino and relays and displays and buttons.
xxx21sensors (e.g. sht21, htu21) are interchangeable. You can check their addresses out to see if you could use them instead. \$\endgroup\$