Update temp.inc.sh

This commit is contained in:
2023-12-29 21:20:55 -06:00
parent 2e6f8fd2ef
commit 7f905b33a3

View File

@@ -624,7 +624,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
if [ "${SENSOR}" == "ServerRoomLA-Probe" ]; then
if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then
if [ "${temp_f}" != "" ] && [ -f ${PW_TMPFOLDER}/.serverroomth ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.serverroomth)) -lt 30 ]; then
if [ "${temp_f}" != "" ] && (( $(bc <<< "${temp_f} >= 2") )) && [ -f ${PW_TMPFOLDER}/.serverroomth ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.serverroomth)) -lt 30 ]; then
[ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] && touch ${PW_TMPFOLDER}/.log.sr.difference
temp_difference=$(bc <<< "scale=2; $(cat ${PW_TMPFOLDER}/.serveroomth)-${temp_f}")
# (( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=2; ${temp_difference} * -1" | bc`