Skip to content

fix: Follow user configured number format.#1338

Closed
nstrandm wants to merge 1 commit intokalkih:masterfrom
nstrandm:fix/locale-number-format
Closed

fix: Follow user configured number format.#1338
nstrandm wants to merge 1 commit intokalkih:masterfrom
nstrandm:fix/locale-number-format

Conversation

@nstrandm
Copy link
Copy Markdown

Fix for issue #1010: Number format not following user profile settings.

Updated the numberFormat method to respect Home Assistant's user profile number_format setting. The card now correctly formats numbers based on the user's locale preferences.

Changes:
Rewrote numberFormat() method in main.js to read hass.locale.number_format and apply the appropriate formatting.
All displayed numbers (state values, Y-axis labels, min/max/avg) now respect user preferences.

Fixes #1010

🤖 Generated with Claude Code

@nstrandm nstrandm changed the title Fix to follow user configured number format. fix: Follow user configured number format. Jan 21, 2026
@ildar170975
Copy link
Copy Markdown
Collaborator

AI-generated code is not accepted, sorry.

@nstrandm
Copy link
Copy Markdown
Author

@ildar170975 even if I have reviewed and tested the code?

@ildar170975
Copy link
Copy Markdown
Collaborator

ildar170975 commented Jan 22, 2026

It will be reviewed. But this cannot be an excuse for people using AI.
Also, I need to warn you that there are ongoing works to add a similar functionality based on native hass functions which will give better and more expected results than just following user-level settings.
Please check available hass methods allowing to get a properly formatted state and attribute value, with or without a unit (including “..ToParts” methods which are currently being added to Frontend).

@ildar170975
Copy link
Copy Markdown
Collaborator

@nstrandm
Hello! Please try #1233

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.

Does not follow user profile configured "Number Format"

2 participants