diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util/formatter.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/util/formatter.js b/src/common/util/formatter.js index 7b7fc96d..0463df2b 100644 --- a/src/common/util/formatter.js +++ b/src/common/util/formatter.js @@ -23,11 +23,11 @@ export const formatNumber = (value, precision = 1) => Number(value.toFixed(preci export const formatPercentage = (value) => `${value}%`; -export const formatTemperature = (value) => `${value}°C`; +export const formatTemperature = (value) => `${value.toFixed(1)}°C`; -export const formatVoltage = (value, t) => `${value} ${t('sharedVoltAbbreviation')}`; +export const formatVoltage = (value, t) => `${value.toFixed(2)} ${t('sharedVoltAbbreviation')}`; -export const formatConsumption = (value, t) => `${value} ${t('sharedLiterPerHourAbbreviation')}`; +export const formatConsumption = (value, t) => `${value.toFixed(2)} ${t('sharedLiterPerHourAbbreviation')}`; export const formatTime = (value, format, hours12) => { if (value) { |