Trying to display a Carriage Return inside a Hubitat Dashboard

Trying to display a Carriage Return inside a Hubitat Dashboard tile using a "RM Connector Variable"

Is this even possible to do using the built in dashboard of Hubitat?

It seems whatever I try, line formatting is stripped from the display even though the connector variable has the proper formatting.

I am trying to do this without a third party solution.

Hmm.... I read this earlier and my first thought was to ask more about what you are trying to do. Even if you are asking a quite direct technical question about your own solution, it can sometimes help to provides a little more context about what you are wanting to get out of using the connector and needing to include a carriage return.

But all that can be a little tedious and overblown for every question.... Sometimes it's more interesting to cut to the chase....

I expect what you may need to look at are some of the drivers that produce tables of data on a single tile / attribute. These would include table row elements (don't quote me on that term...) which the browser will format as separate lines. This may give you some ideas, or you may be able to use one of those drivers... Depending on your requirements.

1 Like

I guess another question would be are two tiles an option?

Using multiple tiles is possible but it seems wasteful to me. I currently make use of the Tile Master Driver to bring together various weather data. Temperature (in/out) Humidity, pressure, wind, etc. If I had the ability of using a linefeed then I could make a lot of that info more formated just using one tile instead of creating a lot of global variables and and taking up a lot of space with individual tiles. I am looking for a native Hubitat solution but it seems a simple linefeed is preventing that path.

use html and put a <br> in the text ?

1 Like

I want to be able to format a tile that I can specify spacing and lines. It seems I can't control the amount of space between characters, nor controlling lines. The tile appears to be stripping out all formatting and I don't know why. I can store a formatted string, I just can't display it using Habitat's dashboard.

I can do that and I can see it in the variable but as soon as you try to display it on a tile, that format is stripped.

OK - if it's stripped then you could use my MQTT text display driver ?
It doesn't need MQTT so dont worry about that

You will have to write the variable value to the text attribute via forceText() or setText() depending on if you want suffix and prefix included

https://raw.githubusercontent.com/xAPPO/MQTT/beta3/MQTT%20Text%20beta%203e%20(test)

I'll take a look. Thanks.

https://raw.githubusercontent.com/xAPPO/MQTT/beta3/MQTT%20Text%20beta%203e%20(test)

That looks familiar in that I tried your driver in the past and it works in that it properly displays in the driver (as you have displayed), but when I set a Hubitat dashboard tile to display that text attribute, all the formatting, ie. < b r > gets stripped from displaying on the tile.

I guess what I am trying to say is I can put all the formatting I want in a variable/attribute but it's the Hubitat dashboard that's causing the issue.

Oh - let me try that - maybe it's changed...

image

image

It's been awhile so I may be confused so I need to go back. I also exclusively use webCoRE so it also has to be able to work with the driver. I can't remember now. I just thought there maybe there was something I was overlooking.

Give it a try and let me know - you should write your variable to my device using forceText() or setText() command depending on whether you want the optional suffix and prefix tags included.
Updating the text attribute directly may work too

Am I looking at the right place here?

The link is above but yes..

1 Like

Hot Damn! Your the man. It works and I can control it inside webCoRE so this is good enough. I know I tried your driver but if must have been awhile ago and could't update it in webCoRE. Can't remember, but it does the trick now. Thanks much.

1 Like

Great ! You can include any html in there e.g. font size, style or color, and you can do the same in the (optional) prefix and suffix to say append °F to a number. There is the Hubitat enforced length limit to the html though

Maybe I should rename it html display device tile and it would be more obvious what it does and useful to all

2 Likes

I also see that using "prefix" and "suffix" I have two text buckets. Nice!

1 Like

I've been successful using < b r > (and some similar table formatting) within strings saved in driver attributes. Normal driver code and a normal "attribute" dashboard tile. However, that didn't work with hub variables using a "variable string" tile. There must be a difference in the tile templates.

ETA: < b r > (without the added spaces) works when posting here also.

1 Like