Update temp.inc.sh

This commit is contained in:
2024-04-10 11:07:32 -05:00
parent 3fae2eb25c
commit eb6cf9e711

View File

@@ -612,7 +612,8 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
[ "$(echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3)" != "" ] && echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3 | read temp_crit_sys || temp_crit_sys=${temp_crit}
fi
echo "${SENSORa} ${SENSOR}"
[ "${SENSORa}" == "ServerRoomTemp" ] && echo "${SENSORa} ${SENSOR}"
temp_f=''
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
mqtt_message=`${mqtt_conn} -t tele/${SENSOR}/SENSOR -C 1`
@@ -691,7 +692,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
[ ! -f ${PW_TMPFOLDER}/.lasttemp/${SENSOR} ] && echo 0 > ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
last_temp=$(cat ${PW_TMPFOLDER}/.lasttemp/${SENSOR})
echo "HERE: [${SENSOR//-/}] - ${last_temp} - ${temp_c} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
[ "${SENSORa}" == "ServerRoomTemp" ] && echo "HERE: [${SENSOR//-/}] - ${last_temp} - ${temp_c} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ] && [ "${temp_h}" != "0" ]; then