Update temp.inc.sh

This commit is contained in:
2023-12-30 14:03:56 -06:00
parent 17b15f1b54
commit 3f4a401494

View File

@@ -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