Skip to content

Commit 27c1962

Browse files
Merge pull request #21 from TobiaszJ/main
Round displayed values to one decimal
2 parents 9550772 + 0c01e03 commit 27c1962

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)