diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 8226149a..9474a939 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -392,6 +392,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ [ "${last_temp[${SENSOR//-/}]}" == "" ] && last_temp[${SENSOR//-/}]=0 logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR} if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then + if [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then SENDNOTICE "${SENSOR} Online" "${SENSOR} Sensor is back online" echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is back online" >> ${logtemp} @@ -401,7 +402,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again" echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp} rm -f ${PW_TMPFOLDER}/${SENSOR}-error.* - elif [ -f ${PW_TMPFOLDER}/${SENSOR}-error* ]; then + elif [ -f ${PW_TMPFOLDER}/${SENSOR}-error.* ]; then rm -f ${PW_TMPFOLDER}/${SENSOR}-error.* fi