Update temp.inc.sh

This commit is contained in:
2023-12-17 11:26:50 -06:00
parent 0dc809c5cb
commit 9f892c83c6

View File

@@ -482,11 +482,7 @@ Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}"
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
if [ "${SENSOR}" == "ServerRoomLA" ]; then
echo "SET SR-LA: ${temp_f}"
temp_difference=$(bc <<< "scale=1; ${temp_f}-${ServerRoomTH}")
(( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=1; ${temp_difference} * -1" | bc`
echo "DIFFERENCE: ${temp_difference}"
if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then
if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 3 ]; then
if [ "${temp_f}" != "" ] && [ "${ServerRoomTH}" != "" ]; then
[ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] && touch ${PW_TMPFOLDER}/.log.sr.difference
temp_difference=$(bc <<< "scale=1; ${temp_f}-${ServerRoomTH}")
@@ -496,7 +492,6 @@ Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}"
fi
elif [ "${SENSOR}" == "ServerRoomTH" ]; then
ServerRoomTH=${temp_f}
echo "SET SR-TH: ${ServerRoomTH}"
fi
###################