Attribute tile - new line

Hey

Is it possible to display some strings in Attribute tile in couple of rows?

I have a string variable which I use as an events list.
I add new row (line) there everytime any doors or windows are open. But when I try to display that variable on dashboard using Attribute tile there is a problem with rows. It looks like this tile deletes all the "enters".

Please help

My variable looks like that:
9:02 Doors are open
9:04 Doors are closed

But Attribute tile looks more or less like that:
9:02 Doors are open 9:04 Doors
are closed

Depending on how you're entering the variable you may be able to put in a < br /> (remove the space before the b) where you want the newline and get it to work

2 Likes

I put the data to the variable through rule machine.
I dont think I can put there html code

I know I can in webCoRE (the display of it gets suppressed as I close the tag, but it functions correctly), but haven't tried RM

And you have new lines in the dashboard attribute tile?

When I go to RM I can see that my variable has got new lines (just with using ENTER button) but they are not displayed on the tile..

Looks like I erased the piston that I had that did that, I'll see if I can recreate and get back to you.

Ok I am waiting :slight_smile:

1 Like

I put it in a declared variable just so that it doesn't get flaky down inside the piston. !Testvar is a device created with a simple device driver that does nothing but set an attribute to the value passed (works like a global connector in RM).

image

image

Code for the device driver if you want it:
https://raw.githubusercontent.com/thebearmay/hubitat/main/dashVariable.groovy

1 Like

Thanks a lot!
Your screenshot gave me an idea how to resolve my problem :slight_smile:

I created new variable and called it "NL". Then I put there <br /> manually through "Devices" section and "Set Variable" command because RM doesn't allow to put html code to the variable. That's why I needed to do it manually.
And then I added "NL" variable through RM to my variable which contains my events log.

Thanks a lot!

1 Like