Thank you for this post. This was my problem also!
Kept getting the “Communication with AHT10 failed!” and “Component aht10.sensor is marked FAILED” error messages, but it showed an address of 0x38 which meant it was communicating. As per your post, changing to “variant: AHT20” did the trick.