Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Option to round /multiply attribute values for state/statePath #96

Open
kaosmagix opened this issue Jan 9, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@kaosmagix
Copy link

This card is great and made it very easy to create a nice usable mobile UI.

I would like to add the Volume level of a media player as the additional state shown (top right circle) using the state and statePath setting. This works but it shows the value unrounded and with all digits. The volume_level ranges between 0-1 and I would like to show it in the circle as a percentage (so 40% and not 0.400000000000023) and if possible also showing the circle fill like brightness does for example. Is it possible to add functionality to add settings for rounding of the attribute, and the option to show it in the circle like for example Brightness does? This last part might be related to the value between 0 and 1 instead of 1 - 100 like Brightness

# lovelace_gen
entity: {{ media_player_entity }}
state: {{ media_player_entity }}
statePath: attributes.volume_level 
@kaosmagix kaosmagix changed the title Option to round /multiply attribute values for state/statePath [Feature Request] Option to round /multiply attribute values for state/statePath Jan 9, 2021
@DBuit DBuit added the enhancement New feature or request label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants