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

Please add an option to round the battery percentage #206

Closed
Aaroneisele55 opened this issue Jan 1, 2025 · 4 comments
Closed

Please add an option to round the battery percentage #206

Aaroneisele55 opened this issue Jan 1, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@Aaroneisele55
Copy link

Aaroneisele55 commented Jan 1, 2025

Is your feature request related to a problem? Please describe.
I just enabled battery reporting and state is currently reported with a high number of unnecessary decimals, at least in the graph. The watch can only show whole % values anyway, so I would like to have rounded battery values.

Describe the solution you'd like
I would like to have a toggle in the settings to round the battery percentage

Describe alternatives you've considered
Screenshot_20250101_171130_Home Assistant
I could just ignore it, but I just don't like the huge amount of decimals on the values

Additional context

@Aaroneisele55 Aaroneisele55 added the enhancement New feature or request label Jan 1, 2025
@philipabbey
Copy link
Collaborator

Agreed, silly number of decimal places. I wonder if it's the watch end reporting them, or the HA end presenting them. There might be nothing in the app to fix!

@philipabbey
Copy link
Collaborator

https://developer.garmin.com/connect-iq/api-docs/Toybox/System/Stats.html#battery-var

Well the call returns a float, so we can try pretty printing the value, say fixed at 1 decimal place, rather than having such a minor part of the app take up settings soace.

@JosephAbbey
Copy link
Member

A quick fix for this is to use a template sensor that uses the round function to give you a rounded value.

@Aaroneisele55
Copy link
Author

Thank you for the suggestion but I just looked at the sensor again and it only had .0 values in the graph, so the problem is seemingly only on the initial value or the second value after enabling battery reporting....

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

3 participants