Sending messages back to HA front end

I'm trying to find a tidy way to send status messages from Node Red back to my Home Assistant dashboard. I've sorted many bits out by replacing text with sensors which looks much better, but actual text seems tricky?

This is an example - my garden irrigation sends back stuff like "irrigation skipped today", "schedule finished", "schedule running" etc.

Currently they use HA text boxes but this is clumsy and you can click into it as its an input box.

I just had a thought to use a sensor to send back just an integer - 1,2,3,4 etc to indicate status and then use conditional dashboard code to convert the number to words as needed. Does that seem that feasible or too complex?? (i'm not sure how to do conditional code in the front end but I'm sure Google will help)

Or is there a simpler way that I have not seen yet????

I just create a string in msg.payload and place that into a ha-websocket created sensor state or attribute.

A sensor entity has to have a primitive value (string, number, boolean) in the state, but HA stores them all as strings anyway. The state string limit, I think, is 255, but it works nicely for "Schedule finished"

The entity "MB Timed Charge" for example has a string for the state, containing the inverter charge times and current.

Display the content of that sensor as a template in a markdown card

Thanks all, i never knew a sensor entity could take text messages, works perfectly :slight_smile: