Firstly, thank you to all in advance for your assistance.
I have an MQTT Topic that contains a random string. This string changes every 120 minutes. It contains both letters, numbers and special characters. It is a Client ID.
I want to read this into Home Assistant “Untouched” as a string, but keep getting “Unkown” displayed in Home Assistant. Planning on running an automation when ClientID changes.
One thought, probably there is a better way. You could call the mqtt.dump service with the willdcard topic “server/#” . This creates a text file in home assistant, “mqtt_dump.txt” . It contains a comma separated list of both the topics and values.
Really learnt a lot from your recommendations which assisted in finding the fault.
I suspect the message is way longer than I originally expected. have not researched the string limits, but I eventually trimmed this string to display the last 16 characters only. This was enough for me to see when the Client ID had changed and trigger the automation I wanted to.