Update powerwall.sh
This commit is contained in:
1 parent
d200d20911
commit
eb134893d5
1 file changed
+3
-1
+3
-1
@@ -651,9 +651,11 @@ TEST(){
|
||||
# echo date:$date sensorid:$sensorid temp:$temp hum:$hum
|
||||
temptotal=$(bc <<< "scale=2; ${temptotal}+${temp}")
|
||||
# echo "- ${temptotal} + ${temp}"
|
||||
((logsfound++))
|
||||
|
||||
done < <(${mysql_conn} -se "USE servermonitor; SELECT date,sensorid,temp,hum from sensor_data WHERE sensorid=2 AND date BETWEEN
|
||||
DATE_SUB(DATE(NOW()), INTERVAL ${daysback} DAY) AND NOW() ORDER BY id DESC;")
|
||||
((logsfound++))
|
||||
|
||||
average=$(bc <<< "scale=2; ${temptotal}/${logsfound}")
|
||||
|
||||
echo "Average: ${average}"
|
||||
|
||||
Reference in new issue
Block a user