diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 47abaf13..ccf4c392 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -1156,8 +1156,9 @@ SENDTEMP(){ # average7=0 fi fi - - c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done + + [ "${PW_DESC_TEMP[${SENSOR}]}" != "" ] && SENSOR_DESC=${PW_DESC_TEMP[${SENSOR}]} || SENSOR_DESC=${SENSOR} + c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR_DESC}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then if [ "${SENSOR}" == "ServerRoomTH" ]; then temp_f=`echo "scale=2; (${temp_c}*(9/5))+32+${PW_ServerRoomTH_Dev}" | bc` @@ -1184,10 +1185,10 @@ SENDTEMP(){ average7_disp=${average7} fi fi - [ "${1}" != "" ] && echo -e "${SENSOR}${spc}${temp_f_disp}${GAUGESH} / ${average1_disp}${GAUGESH} / ${average7_disp}${GAUGESH}" || echo -e "${SENSOR}${spc}${temp_f_disp}${GAUGESH}" + [ "${1}" != "" ] && echo -e "${SENSOR_DESC}${spc}${temp_f_disp}${GAUGESH} / ${average1_disp}${GAUGESH} / ${average7_disp}${GAUGESH}" || echo -e "${SENSOR}${spc}${temp_f_disp}${GAUGESH}" else - echo -e "${SENSOR}${spc}No Data" + echo -e "${SENSOR_DESC}${spc}No Data" fi last_sensor=${SENSORa}