This commit is contained in:
proddy
2021-06-08 18:24:16 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -120,9 +120,9 @@ const pluralize = (count: number, noun: string, suffix = 's') =>
function formatValue(value: any, uom: number) {
switch (uom) {
case DeviceValueUOM.HOURS:
return formatDuration(value * 60);
return value ? formatDuration(value * 60) : '0 hours';
case DeviceValueUOM.MINUTES:
return formatDuration(value);
return value ? formatDuration(value) : '0 minutes';
case DeviceValueUOM.NONE:
return value;
case DeviceValueUOM.NUM:

View File

@@ -238,7 +238,7 @@ MAKE_PSTR_WORD(error)
// boiler lists
MAKE_PSTR_LIST(enum_off_time_date, F_(off), F_(time), F_(date))
MAKE_PSTR_LIST(enum_freq, F_(off), F_(1x3min), F_(2x3min), F_(3x3min), F_(4x3min), F_(5x3min), F_(6x3min), F_(continuous))
MAKE_PSTR_LIST(enum_charge, F_(3wayvalve), F_(chargepump))
MAKE_PSTR_LIST(enum_charge, F_(chargepump), F_(3wayvalve))
MAKE_PSTR_LIST(enum_comfort, F_(hot), F_(eco), F_(intelligent))
MAKE_PSTR_LIST(enum_flow, F_(off), F_(flow), F_(bufferedflow), F_(buffer), F_(layeredbuffer))
MAKE_PSTR_LIST(enum_reset, F_(maintenance), F_(error))