Update powerwall.sh
This commit is contained in:
@@ -172,11 +172,12 @@ AVERAGETEMP(){
|
|||||||
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'"))
|
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'"))
|
||||||
entityid=${entityid[1]}
|
entityid=${entityid[1]}
|
||||||
WHERE="sensorid=${sensorid} AND entity=${entityid}"
|
WHERE="sensorid=${sensorid} AND entity=${entityid}"
|
||||||
# echo "HERE:${1} - ${2} - ${3} - ${entityid}"
|
|
||||||
else
|
else
|
||||||
WHERE="sensorid=${sensorid}"
|
WHERE="sensorid=${sensorid}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "HERE: ${1} - ${2} - ${3} - ${entityid}"
|
||||||
|
|
||||||
while IFS=$'\t' read date temp hum ;do
|
while IFS=$'\t' read date temp hum ;do
|
||||||
temptotal=$(bc <<< "scale=1; ${temptotal}+${temp}")
|
temptotal=$(bc <<< "scale=1; ${temptotal}+${temp}")
|
||||||
((logsfound++))
|
((logsfound++))
|
||||||
|
|||||||
Reference in New Issue
Block a user