Update temp.inc.sh
This commit is contained in:
@@ -84,7 +84,18 @@ CHECKTEMP(){
|
||||
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}"
|
||||
[ "${avgdays}" != "noavg" ] && echo -en "Pulling data and calculating ${avgdays} Day average ... " || echo -en "Pulling data ... "
|
||||
if [ "${avgdays}" != "noavg" ]; then
|
||||
if [ $(bc -l <<< "${avgdays} < 1") -eq 1 ]; then
|
||||
avgdays_disp="$(ROUND_NUMBER $(bc <<< "scale=2; ${avgdays}*24")) Hour"
|
||||
elif [ $(bc -l <<< "${avgdays} = 1") -eq 1 ]; then
|
||||
avgdays_disp="${avgdays} Day"
|
||||
else
|
||||
avgdays_disp="${avgdays} Days"
|
||||
fi
|
||||
echo -en "Pulling data and calculating ${avgdays} Day average ... "
|
||||
else
|
||||
echo -en "Pulling data ... "
|
||||
fi
|
||||
reading=$(CHECKTEMPSENSOR ${SENSOR} . . . . ${avgdays})
|
||||
echo -e "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading}${idsCL[Default]}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user