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

Locale-aware number formatting #212

Merged
merged 1 commit into from
Dec 17, 2021
Merged

Locale-aware number formatting #212

merged 1 commit into from
Dec 17, 2021

Conversation

techillin
Copy link
Contributor

Locale-aware number formatting

Locale-aware number formatting
@benct benct merged commit 1c6ce79 into benct:master Dec 17, 2021
@benct
Copy link
Owner

benct commented Dec 17, 2021

Thanks!

@bcutter
Copy link

bcutter commented Dec 18, 2021

Now some attributes look strange. E. g. this is shown with , instead of . --> how to configure this?

image

image

@benct
Copy link
Owner

benct commented Dec 18, 2021

Numbers are now formatted according to your locale, which apparently use commas and not period. You'll have to change locale/language in HA settings to change this.

@bcutter
Copy link

bcutter commented Dec 18, 2021

Have a look at the first screenshot. It's from more info card. It uses dots correctly. Multiple-entity-row is misinterpreting something here.

Give us control on a per entity/attribute basis to set the view individually.

@benct benct changed the title Update index.js Locale-aware number formatting Dec 18, 2021
@benct
Copy link
Owner

benct commented Dec 18, 2021

Was using the wrong field from HA to handle locale. Should be fixed in version 4.3.1.

@bcutter
Copy link

bcutter commented Dec 19, 2021

Was using the wrong field from HA to handle locale. Should be fixed in version 4.3.1.

Thanks for looking into this so quickly. I updated to 4.3.1, additionally reset Frontensegeln cache and I'm sorry to report it still shows those two attributes wrong while in raw (dev tools) it's shown correctly:

image

@bcutter
Copy link

bcutter commented Dec 22, 2021

OK I found more and more places this crashed my views. It's completely bogus why version information of entities or attributes is shown with commata instead of points now (version "5,6", that's really strange). Versioning is not a matter of location awareness. Guess I need to file an issue bout this, right.

@bcutter
Copy link

bcutter commented Dec 24, 2021

@benct please have a look at https://community.home-assistant.io/t/multiple-entity-row-card-local-number-formatting-update-broke-view/370718 for examples when this local number awareness feature is going too far.

It's behavior is completely random.

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.

3 participants