Update temp.inc.sh

This commit is contained in:
2024-02-06 19:29:00 -06:00
parent 003429dc54
commit a5eb32f31f

View File

@@ -73,7 +73,7 @@ CHECKTEMP(){
DIVIDER . yellow ${PRI_WIDTH}
for SENSOR in ${PW_SENSOR_ORD[@]}; do
if ([ "${search}" == "" ] || [[ "${SENSOR,,}" = *"${search,,}"* ]]) && [ "${PW_SENSOR_TYPE[${SENSOR}]}" != "esxi" ] && ([ "${temptype}" != "fans" ] || ([ "${temptype}" == "fans" ] && [[ "${SENSOR}" = *"Room"* ]])); then
[ "${last_sensor}" == "${SENSOR%%-*}" ] && [ "${SENSOR}" != "Offsite-Monitor-CPU" ] && echo -en "\033[1A"
[ "${last_sensor%%-*}" == "${SENSOR%%-*}" ] && [ "${last_sensor}" != "Offsite-ServerRoom" ] && echo -en "\033[1A"
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]}"
@@ -97,7 +97,7 @@ CHECKTEMP(){
echo -e "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Sensor Offline${idsCL[Default]}"
fi
echo
last_sensor=${SENSOR%%-*}
last_sensor=${SENSOR}
fi
done
DIVIDER . yellow ${PRI_WIDTH}
@@ -987,7 +987,7 @@ SENDTEMP(){
else
GAUGESH="'F"
fi
[ "${last_sensor}" != "" ] && [ "${last_sensor}" != "${SENSOR%%-*}" ] && echo
[ "${last_sensor}" != "" ] && [ "${last_sensor%%-*}" != "${SENSOR%%-*}" ] && echo
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
mqtt_message=`${mqtt_conn} -t tele/${SENSORa}/SENSOR -C 1`
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
@@ -1078,7 +1078,7 @@ SENDTEMP(){
echo -e "${SENSOR}${spc}No Data"
fi
last_sensor=${SENSORa%%-*}
last_sensor=${SENSORa}
done
fi