Update temp.inc.sh

This commit is contained in:
2023-12-26 18:36:18 -06:00
parent 81f8fd8c52
commit 2a7090ffbf

View File

@@ -585,11 +585,15 @@ Previous Temp: ${last_temp[${SENSOR//-/}]}${GAUGESH}"
if [ "${SENSOR}" == "ServerRoomLA" ]; then
# 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 ]; then
echo -en "HERE: ${temp_probe_f} - ${ServerRoomTH} = "
if [ "${temp_probe_f}" != "" ] && [ "${ServerRoomTH}" != "" ]; then
[ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] && touch ${PW_TMPFOLDER}/.log.sr.difference
temp_difference=$(bc <<< "scale=2; ${ServerRoomTH}-${temp_probe_f}")
echo ${temp_difference}
# (( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=2; ${temp_difference} * -1" | bc`
echo "$(date "+%Y-%m-%d %H:%M:%S")~${temp_difference}" >> ${PW_TMPFOLDER}/.log.sr.difference
else
echo
fi
fi
elif [ "${SENSOR}" == "ServerRoomTH" ]; then