Display Units on Dashboard Tiles

Concern or education required.

I am trying to display units on Dashboard tiles (in this case, air quality data). Below are three tiles:
image

The PM_2_5 _Measurement and airQuality are not displaying the units for the same. Both attributes are set up as a number. Example:
attribute "PM_2_5_Measurement", "number"

The events are displaying the units:

Yet there is no display of the unit value.
Is this the expected result?

It's possible.

In the tile definition, there's a checkbox for "Override Device Unit", which then pops up a text line for the entry. I had to use that to display "%" after the humidity reading on a couple of my multifunction sensors.

You are using the attribute tile, correct? That doesn't allow you to display a unit. You have to have the unit in the Attribute itself which would require you to modify the driver to include it. That would also make the attribute a string instead of a number.

I was afraid of that. . As usual, thanks.
Dave

1 Like

I know this is old, but this was the top result when I searched for advice on the same thing today, and thought it may be useful. I did it with CSS, and I am happy how two attribute tiles that had no units of measure now match the rest of the tiles that are pulling sensor data and using their pre-populated units of measure. Maybe this is addressed in more recent posts, but I just cobbled this together with advice on other topics from elsewhere...

If you look at my screenshot below - tile 61 is an attribute for propane tank level that had no units and tile 40 was an attribute for an energy meter that had no units.

ScreenHunter 09

Just added the following in my CSS and adjusted the font size of the unit of measure to match the others...

#tile-61 .tile-primary:after {font-size: 14px; content: ' %' !important; }
#tile-40 .tile-primary:after {font-size: 14px; content: ' W' !important; }
1 Like