This commit is contained in:
2023-08-24 18:54:40 -05:00
parent c11b0cbf64
commit 97591e1de6
2 changed files with 7 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.2.58-08202023'
VERS='2.2.59-08242023'
noheader=' update service dailytemp '

View File

@@ -151,6 +151,11 @@ AVERAGETEMP(){
echo ${average}
}
SENDDAILY(){
dailtemp=$(DAILYTEMP)
SENDNOTICE "Daily Temp Readings" "${dailtemp}"
}
CHECKTEMP_SERVICE(){
cw=20
declare -A last_temp
@@ -159,7 +164,7 @@ CHECKTEMP_SERVICE(){
if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then
if [ ! -f ${PW_TMPFOLDER}/.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.sentdaily)) -gt 600 ]; then
touch ${PW_TMPFOLDER}/.sentdaily
SENDNOTICE "Daily Temp Readings" "$(DAILYTEMP)" &
SENDDAILY &
fi
fi
for SENSORa in ${PW_SENSOR_ORD[@]}; do