diff --git a/defaults.inc b/defaults.inc index ffd555a7..a5007246 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.2.58-08202023' +VERS='2.2.59-08242023' noheader=' update service dailytemp ' diff --git a/powerwall.sh b/powerwall.sh index aca7718d..fa0ca9de 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -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