Skip to content

feat(sensor): round battery voltage display to 1 decimal#270

Open
sslivins wants to merge 1 commit intobinarydev:mainfrom
sslivins:fix/battery-voltage-precision
Open

feat(sensor): round battery voltage display to 1 decimal#270
sslivins wants to merge 1 commit intobinarydev:mainfrom
sslivins:fix/battery-voltage-precision

Conversation

@sslivins
Copy link
Copy Markdown

@sslivins sslivins commented Apr 30, 2026

Tiny one-liner. The API returns battery voltage with a decimal (e.g. 13.7), but the device page in HA rounds it to a whole number, so it shows up as:

Battery Voltage: 14 V

Adding suggested_display_precision = 1 tells HA to render the value at 1 decimal in the UI while keeping whatever the API gives us in state for history/graphs:

Battery Voltage: 13.7 V

Last of the followups (along with #267 / #268 / #269). Take it or leave it, no worries either way.

The API returns battery voltage with multiple decimals (e.g. 13.74321) which makes the dashboard look noisy. Add suggested_display_precision = 1 so HA rounds the displayed value to 1 decimal while keeping the full value in state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant