Update temp.inc.sh

This commit is contained in:
2024-04-21 14:57:24 -05:00
parent 3d4b5d5218
commit 508b1b68e5

View File

@@ -300,19 +300,18 @@ CHECKTEMP(){
reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}" reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}"
echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}" echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}"
echo " HERE: $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) (${temp_f})"
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old ]; then if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old ]; then
if [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then if [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
reading="${reading} ${idsCL[LightRed]}\u2B06 " echo -en "${reading} ${idsCL[LightRed]}\u2B06 "
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then
reading="${reading} ${idsCL[LightGreen]}\u2B07 " echo -en " ${idsCL[LightGreen]}\u2B07 "
elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)" ]; then elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)" ]; then
reading="${reading} ${idsCL[LightCyan]}${idsST[Bold]}~${idsST[Reset]} " echo -en " ${idsCL[LightCyan]}${idsST[Bold]}~${idsST[Reset]} "
else else
reading="${reading} " echo -en " "
fi fi
fi fi
if [ "${avgdays}" != "noavg" ]; then if [ "${avgdays}" != "noavg" ]; then
echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... " echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
average=$(AVERAGETEMP ${SENSOR} ${avgdays} ${sensorname// /_}) average=$(AVERAGETEMP ${SENSOR} ${avgdays} ${sensorname// /_})