I want to integreate the text device class using the mqtt/config but i cant get it to work

Hello,

Im am currently trying to implement a script that pushes data from my solarboiler sensor via mqtt to homeassisant. Some of these values get back to me as a word type and i want to display them. this worked fine but now i want to use the mqtt autoconfiguration command and i cant get it to work. Is there anyone that has done this before or knows how to do this?

Kind regards