1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-18 16:07:40 +01:00

Fix monetary device class state display with non-ISO 4217 currency symbols (#29887)

This commit is contained in:
Petar Petrov
2026-02-27 14:59:14 +01:00
committed by Bram Kragten
parent 8f5059c24a
commit aff1fedc9d

View File

@@ -133,9 +133,10 @@ const computeStateToPartsFromEntityAttributes = (
),
});
} catch (_err) {
// fallback to default
// fallback to default numeric formatting below
}
if (parts.length) {
const TYPE_MAP: Record<string, ValuePart["type"]> = {
integer: "value",
group: "value",
@@ -158,9 +159,9 @@ const computeStateToPartsFromEntityAttributes = (
valueParts.push({ type, value: part.value });
}
}
return valueParts;
}
}
// default processing of numeric values
const value = formatNumber(