From 5196045f595f1cbe9948253bb98903a6329a9076 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 17 Dec 2023 00:14:19 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 05350316..dcb28488 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -173,13 +173,14 @@ CHECKTEMPSENSOR(){ echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit}${GAUGESH}=>${idsCL[Default]} ]" if [ "${1}" == "ServerRoomLA" ]; then + unset average temp_probe_f=$(bc <<< "scale=1; ${temp_probe_c}*1.8+32") tmp="${spct}${temp_probe_f}" c=0; spc=''; spc1=`expr 10 - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done [ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' ' [ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' ' echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${1}-Probe ${idsST[Reset]}${spc}${idsCL[Default]}: " - if [ "${average}" != "" ]; then + if [ "${6}" != "noavg" ]; then average=$(AVERAGETEMP ${PW_SENSOR_ID["${1}-Probe"]} ${avgdays}) c=0; spca=''; spc1=`expr 6 - ${#average}`; until [ ${c} = ${spc1} ]; do spca="${spca} "; c=`expr ${c} + 1`; done fi