Trying to display a Carriage Return inside a Hubitat Dashboard

New to HE (and not much of a programmer/coder) but added the MQTT Text and am struggling to figure out how to read Hub Variables in the text string. Feel like I'm missing something simple. Looking forward to how this can improve my dashboards!

A bit late to the party on this question, but it's one worth asking (again):
What is the most straightforward way to include carriage returns inside String hub variables such that they get displayed properly on Hubitat Dashboards?

Before posting my currently test workflow, let me stipulate that I'm trying my best to achieve a multi-line output without resorting to 3rd party apps (MQTT, HTML Template, etc.) or other work-arounds.

When I define Local Variables in RM, each containing a String/Char followed by a hard return (ENTER), and concatenating them together...

...Rule Machine has no problem accepting/displaying the result, as expected:

When I then pass (via SetVariable) that exact String value over to a Hub Variable, the <CR>s seem to be preserved just fine:

BUT, looking inside its corresponding Variable Connector, it appears that the <CR>s have been filtered, thus lost:
he_varcon_cr

SO that when I then include the VC into a Dashboard and add it to my layout with an Attribute > Variable template, here's what I see, all on one line:

I know it's possible for dashboard alchemists to work some format-preserving sorcery, but is there no clear(er) in-house path from A to B to C that allows multi-line text displays?

Just putting a <br> should work, the tiles just drop the text into the HTML so a regular line break does nothing. I am doing that in an attribute and it works, unless something with the variables breaks the html formatting somehow.

1 Like

If you use the UI to change variables it will strip out any HTML tags, if you are coding an app or driver you can embed the tags in the value.

2 Likes

Thanks, I knew you guys would set me straight. If the setup weren't so "fiddly" I wouldn't keep revisiting this question. Multi-line tiles has been a hot topic since forever, and now that I'm dabbling, I'm starting to understand the allure.

1 Like