From 0c6a4739ea1316ae2153b4576c59f866ccff1e20 Mon Sep 17 00:00:00 2001 From: JHale716 Date: Tue, 4 Jun 2019 22:23:02 +1200 Subject: [PATCH] Update MMM-SystemStats.js Operating on an Intel Mac, Linux reports the temperature with a preceding '+' that is undesirable. --- MMM-SystemStats.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MMM-SystemStats.js b/MMM-SystemStats.js index 1c5d029..26a9855 100644 --- a/MMM-SystemStats.js +++ b/MMM-SystemStats.js @@ -60,6 +60,8 @@ Module.register('MMM-SystemStats', { //Log.log(payload); if (notification === 'STATS') { this.stats.cpuTemp = payload.cpuTemp; + // remove plus sign from the beginning + this.stats.cpuTemp = this.stats.cpuTemp.replace(/^\+/, ""); //console.log("this.config.useSyslog-" + this.config.useSyslog + ', this.stats.cpuTemp-'+parseInt(this.stats.cpuTemp)+', this.config.thresholdCPUTemp-'+this.config.thresholdCPUTemp); if (this.config.useSyslog) { var cpuTemp = Math.ceil(parseFloat(this.stats.cpuTemp));