From 61f524fb9315a95d5ef30d1c125acc4e533015a8 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 4 Nov 2023 11:16:03 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerwall.sh b/powerwall.sh index 018521ec..72ac6736 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -172,11 +172,12 @@ AVERAGETEMP(){ entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'")) entityid=${entityid[1]} WHERE="sensorid=${sensorid} AND entity=${entityid}" - # echo "HERE:${1} - ${2} - ${3} - ${entityid}" else WHERE="sensorid=${sensorid}" fi + echo "HERE: ${1} - ${2} - ${3} - ${entityid}" + while IFS=$'\t' read date temp hum ;do temptotal=$(bc <<< "scale=1; ${temptotal}+${temp}") ((logsfound++))