I’ve spent a few evenings and lunch breaks getting my head around auto-discovery with MQTT. It’s working at last, thanks to bits learnt from many forum posts.
The odd bit: HA would only learn of 2 of the 4 sensors. I’d delete the device and run my config script again. 2 sensors would appear as before. After clearing the logs I ran the script again. NO other changes had been made. The missing two sensors appeared. Has anyone else seen this? How could logs impact discovery?