Update temp.inc.sh

This commit is contained in:
2024-04-23 14:37:45 -05:00
parent e52df1f6e1
commit 79735e46d2

View File

@@ -1059,7 +1059,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
if [ ! -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre ]; then
[ ! -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ] && echo "${temp_f}" > ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre
elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre)) -ge 300 ]; then
elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre)) -ge 1800 ]; then
[ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ] && mv -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2
mv -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old
echo "${temp_f}" > ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.pre