Update powerwall.sh

This commit is contained in:
2023-05-16 20:17:42 -05:00
parent 2931ddc4c3
commit ec61e14272

View File

@@ -168,7 +168,7 @@ NORMAL TEMP: ${temp_f}'F"
last_temp[${SENSOR}]=1
fi
[ -f ${TMPFOLDER}/${SENSOR}.insert ] && errtime=$(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/${SENSOR}.insert)) || errtime=0
[ -f ${TMPFOLDER}/${SENSOR}.insert ] && errtime=$(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/${SENSOR}.insert)) || errtime=100000
if [ ${errtime} -ge 300 ]; then
if [ "${temp_h}" != "" ]; then
QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`, \`hum\`) VALUES ('${SENSOR_ID[${SENSOR}]}','${datetime}','${temp_f}','${temp_h}')"