Skip to content

Commit 0c01e03

Browse files
author
TobiaszJ
committed
Round displayed values to one decimal
1 parent 9550772 commit 0c01e03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dist/heat-pump-card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class HeatPumpCard extends HTMLElement {
198198

199199
formatNumValue(stateValue) {
200200
if (stateValue) {
201-
return new Intl.NumberFormat(undefined, {minimumFractionDigits: 1}).format(stateValue.state) + " " + stateValue.attributes.unit_of_measurement;
201+
return new Intl.NumberFormat(undefined, {minimumFractionDigits: 1, maximumFractionDigits: 1}).format(stateValue.state) + " " + stateValue.attributes.unit_of_measurement;
202202
}
203203
return null;
204204
}

0 commit comments

Comments
 (0)