Update temp.inc.sh
This commit is contained in:
@@ -1199,7 +1199,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
|
||||
else
|
||||
wait=$(echo "scale=0; ${PW_MYSQL_LOG_INTERVAL_NORMAL}*60" | bc)
|
||||
fi
|
||||
|
||||
|
||||
if [ "${PW_SENSOR_ID[${SENSORa}]}" != "" ] && [ ${lastinsert} -ge ${wait} ]; then
|
||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then
|
||||
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${vSENSOR// /_}' AND sensorid='${PW_SENSOR_ID[${SENSORa}]}'"))
|
||||
@@ -1224,7 +1224,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
|
||||
QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`speed\`) VALUES ('${PW_SENSOR_ID[${SENSORa}]}','$(date +'%Y-%m-%d %H:%M:%S')','${temp_c}')"
|
||||
elif [ "${temp_h}" != "" ] && [ "${temp_h}" != "0" ]; then
|
||||
QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`, \`hum\`) VALUES ('${PW_SENSOR_ID[${SENSORa}]}','$(date +'%Y-%m-%d %H:%M:%S')','${temp_f}','${temp_h}')"
|
||||
elif [ "${temp_f}" != "32.00" ]; then
|
||||
elif [ "${temp_f}" != "32.00" ] && [ "${temp_f}" != "35.60" ]; then
|
||||
QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`) VALUES ('${PW_SENSOR_ID[${SENSORa}]}','$(date +'%Y-%m-%d %H:%M:%S')','${temp_f}')"
|
||||
|
||||
elif [ "${SENSOR}" == "Powerwall-Switch" ]; then
|
||||
|
||||
Reference in New Issue
Block a user