diff --git a/js_plugins/adei.js b/js_plugins/adei.js index 6b587b4..f53bcca 100644 --- a/js_plugins/adei.js +++ b/js_plugins/adei.js @@ -69,11 +69,15 @@ function parse_adei(key, value, timestamp, invalid) { } } else { if (data_decimal_numbers != undefined && data_decimal_numbers >= 0) { - value = (Math.round(value * 100) / 100).toFixed(data_decimal_numbers); + if (value >= 0) { + value = (Math.round(value * 100) / 100).toFixed(data_decimal_numbers); + } else { + // negative value + value = ((value * 100) / 100).toFixed(data_decimal_numbers); + } } } - if (invalid != undefined && invalid < delta) { $("#" + key + "> .value").css('color', 'grey'); $("#" + key + "> .unit-name").css('color', 'grey');