Update powerwall.sh

This commit is contained in:
2023-05-16 21:53:42 -05:00
parent f1b0864d9b
commit 065b5149e4

View File

@@ -614,8 +614,8 @@ TEST(){
while IFS=$'\t' read date sensorid temp hum ;do
# echo date:$date sensorid:$sensorid temp:$temp hum:$hum
temptotal=$(bc <<< "scale=2; ${temptotal}+${temp}")
echo "- ${temptotal} + ${temp}"
done < <(${mysql_conn} -se "USE servermonitor; SELECT date,sensorid,temp,hum from sensor_data WHERE sensorid=2 ORDER BY id DESC LIMIT 10;")
# echo "- ${temptotal} + ${temp}"
done < <(${mysql_conn} -se "USE servermonitor; SELECT date,sensorid,temp,hum from sensor_data WHERE sensorid=2 ORDER BY id DESC LIMIT 10000;")
average=$(bc <<< "scale=2; ${temptotal}/10000")