Feature Request: Format - Percent?
kylepyke opened this issue · comments
kylepyke commented
I'm wondering if it's possible in a future release to add a percent
value to the format:
option, to convert single decimal places to percentage. For example, 0.3
would become 30%
.
This would be helpful for, say displaying volume for a media_player.
Thanks for all of your work on this repo!
Lukas commented
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 (
) would already suffice.Unfortunately, I am not into JS deployment. Therefore I would motivate someone else to look into this more deeply :-)