i do it the other way around. Systemd.timer reads temp from pi /proc, and sends it via mqtt channel to HA. There is dht22 driver in kernel that gives room temp also via proc.