Update temp.inc.sh
This commit is contained in:
@@ -392,6 +392,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
[ "${last_temp[${SENSOR//-/}]}" == "" ] && last_temp[${SENSOR//-/}]=0
|
[ "${last_temp[${SENSOR//-/}]}" == "" ] && last_temp[${SENSOR//-/}]=0
|
||||||
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
|
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
|
||||||
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
|
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
|
||||||
|
|
||||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
if [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||||
SENDNOTICE "${SENSOR} Online" "${SENSOR} Sensor is back online"
|
SENDNOTICE "${SENSOR} Online" "${SENSOR} Sensor is back online"
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is back online" >> ${logtemp}
|
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"
|
SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again"
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
|
||||||
rm -f ${PW_TMPFOLDER}/${SENSOR}-error.*
|
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.*
|
rm -f ${PW_TMPFOLDER}/${SENSOR}-error.*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user