Update temp.inc.sh

This commit is contained in:
2024-05-13 16:54:10 -05:00
parent bcce465e78
commit a1ef04e276

View File

@@ -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