mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix display precision label when unknown or unavailable (#15610)
This commit is contained in:
parent
087bda22d4
commit
d4ace99de3
@ -288,7 +288,8 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
|
||||
private precisionLabel(precision?: number, stateValue?: string) {
|
||||
const value = stateValue ?? 0;
|
||||
const stateValueNumber = Number(stateValue);
|
||||
const value = !isNaN(stateValueNumber) ? stateValueNumber : 0;
|
||||
return formatNumber(value, this.hass.locale, {
|
||||
minimumFractionDigits: precision,
|
||||
maximumFractionDigits: precision,
|
||||
|
Loading…
x
Reference in New Issue
Block a user