I have a combo ENS160 + AHT2X, purchased from cheap AliExpress supplier and can confirm the AHT2X measurement is useless. It reads >5 DegC too high when the ENS160 is enabled and >1 DegC too high with ENS160 disabled. The ground backplane on the board just equalises the heat from all components, even with the AHT2X out on a little island.
[Corrected Post]
Ah, but the purpose of the AHT2X combo is not so we humans can measure ambient temperature and %RH, but rather so the temperature and RH data can be used to compensate the ENS160 to improve accuracy. If we RTFM, (yes, I admit, I did this when all else failed) then we will find that the ENS160 is quite a sophisticated little animal and can accept temperature and RH data written to its registers to improve the accuracy of the eCO2 and TVOC measurements.
I’ve noticed that the Temperature and Humidity are consistent in their ‘error’ and track closely with a known control sensor.
If you’re not using this for fine homeostasis temperature control and just need a ‘it’s there or thereabouts’ comfort level measurement:
if you copy the AHT21 sensor section of your code, change the ID’s of the Temp & RH sensors in the copy, then remove the Names from the original sensors (which are used for the ENS160 compensation).
Add a filter offset - use the difference observed from a control to each of new Temp and Humidity sensors… and you’re reading in HA will be ‘corrected’, within a margin of error but negligible, for HA use. And the compensation will still be correct for the ENS160 to function correctly.
I’ve added a heatsink and 47uF 10v cap to all boards whether it was working or not.