A dht11 or dht22 (if you want/need temps to .1 decimal place) can be bought and attached to the gpio ports or the raspberry pi. Then use the adafruits dht library to read the value from the gpio port and post it to home assistant. The best way I found to do this was via mqtt.