Update powerwall.sh

This commit is contained in:
2023-11-04 11:16:03 -05:00
parent 8de4ad7504
commit 61f524fb93

View File

@@ -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++))