Dashboard Power Meter template - why no "W" units

I have a dashboard to bring together all the power measuring devices in my house.
Nearly all of them use the "PowerMeter" attribute, and so I pick the PowerMeter template to display them.
First off, I see 3 digits of floating point "precision" from a lot of devices. I wish it just displayed as an integer.
Some drivers round to 1 digit, but even that's unnecessary.
For drivers where I can edit the code, I switch the type from float to integer.

But most annoyingly, there's no "W" units displayed. I verified the drivers that have code I can see are publishing it as the units, so it looks to be the dashboard template.
I searched all over the forums and saw screenshots with the same issue, and discussions on how to add it into string attributes, but no solution to displaying the units normally.

Just adding one now to a dashboard, let me see what I can do. Will most likely include some custom CSS... I agree it would be nice to have the integer formatting and the W suffix as native options.

Add this to the Custom CSS section of the dashboard, replacing the tile number, 67 in my case, with the tile id of your power meter tile. To access the Custom CSS, click the cog icon, select Advanced, then CSS, pasting in the text below and modifying the tile id.

#tile-67 .tile-primary:after { visibility: visible !important; content: " W" !important; }

Alternatively, you could look at my Simple CSS Editor, which is what I used to do this, adding text after the primary text element.


If I could add to any future request for an enhancement, it would be nice if the dashboard could also provide the option to detect larger wattage values and elevate them to a kW value, e.g. 2500 W could be detected and represented as 2.5kW

1 Like

Thanks, works fine.

1 Like