Update temp.inc.sh

This commit is contained in:
2023-12-26 14:02:25 -06:00
parent 7ebb3c3a91
commit a262d10c1a

View File

@@ -184,8 +184,12 @@ CHECKTEMPSENSOR(){
if [ "${PW_SENSOR_TYPE[${1}]}" == "system" ] && [[ "${1}" = *"FAN"* ]]; then
temp_f_disp=$(IDS_NUMBER_FORMAT ${temp_f} 0)
temp_warn_disp=$(IDS_NUMBER_FORMAT ${temp_warn} 0)
temp_crit_disp=$(IDS_NUMBER_FORMAT ${temp_crit} 0)
else
temp_f_disp=${temp_f}
temp_warn_disp=${temp_warn}
temp_crit_disp=${temp_crit}
fi
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
@@ -200,7 +204,7 @@ CHECKTEMPSENSOR(){
c=0; spc=''; spc1=`expr 12 - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit}${GAUGESH}=>${idsCL[Default]} ]"
echo -e "${spc}[${spcw}${idsCL[Yellow]}${temp_warn_disp}${GAUGESH}${idsCL[Default]} /${spcc}${idsCL[LightRed]}${temp_crit_disp}${GAUGESH}=>${idsCL[Default]} ]"
if [ "${1}" == "ServerRoomLA" ]; then
temp_probe_f=$(bc <<< "scale=2; ${temp_probe_c}*1.8+32")