The company discloses the capability on the product page for the all-new HomePod.
Temperature and humidity sensing is optimized for indoor, domestic settings, when ambient temperatures are around 15º C to 30º C and relative humidity is around 30% to 70%. Accuracy may decrease in some situations where audio is playing for an extended period of time at high volume levels. HomePod requires some time to calibrate the sensors immediately after starting up before results are displayed.
It appears the HomePod mini had a temperature and humidity sensor this whole time; however, Apple chose not to enable it. Presumably, the functionality will be activated with a future update, likely iOS 16.3.
Please download the iClarified app or follow iClarified on Twitter, Facebook, YouTube, and RSS for more Apple updates.