Open kylepyke opened 6 months ago
I came across this idea as well and would place a +1 for this feature.
I think adding something like
...
else if (config.format === 'percent') {
value = Math.round(value * 100);
unit = '%';
...
to the formatting part of the code (https://github.com/benct/lovelace-multiple-entity-row/blob/a3302f2778aa9a0b9e88cd829fc68e950da992fc/src/entity.js#L40) would already suffice.
Unfortunately, I am not into JS deployment. Therefore I would motivate someone else to look into this more deeply :-)
I'm wondering if it's possible in a future release to add a
percent
value to theformat:
option, to convert single decimal places to percentage. For example,0.3
would become30%
.This would be helpful for, say displaying volume for a media_player.
Thanks for all of your work on this repo!