Update temp.inc.sh

This commit is contained in:
2025-03-09 12:05:35 -05:00
parent 5b1a25e39c
commit a4d6f81dd3

View File

@@ -118,8 +118,11 @@ CHECKTEMP(){
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
echo 1
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
echo 2
if [ "${temp_f}" != "timeout" ] && [ "${temp_f}" != "offline" ]; then
echo 3
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && temp_f_disp=$(IDS_NUMBER_FORMAT ${temp_f} 0) || temp_f_disp=${temp_f}
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
lclr="${idsCL[Yellow]}"
@@ -131,8 +134,10 @@ CHECKTEMP(){
lclr="${idsCL[Green]}"
lmd="Normal "
fi
echo 4
c=0; spct=''; [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && spc1=`expr 6 - ${#temp_f}` || spc1=`expr 7 - ${#temp_f}`
until [ ${c} = ${spc1} ]; do spct="${spct} "; ((c++)); done
echo 5
reading="${lclr}${lmd}${spct}"$(IDS_NUMBER_FORMAT ${temp_f})"${GAUGESH}"
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K"
echo -en "${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading} "