Fix for monetary entities (#12378)

This commit is contained in:
Wesley Vos 2022-04-22 04:01:09 +02:00 committed by GitHub
parent 6865791596
commit c305dd4cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ export const computeStateDisplay = (
return formatNumber(compareState, locale, { return formatNumber(compareState, locale, {
style: "currency", style: "currency",
currency: stateObj.attributes.unit_of_measurement, currency: stateObj.attributes.unit_of_measurement,
minimumFractionDigits: 2,
}); });
} catch (_err) { } catch (_err) {
// fallback to default // fallback to default