From ad5103c916669ba5cf4b2bebd020464ba1173c7c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 3 Sep 2022 20:17:39 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 5a122592..7e63e739 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -35,7 +35,7 @@ CHECKTEMP(){ } CHECKTEMP_SERVICE(){ - last_temp=1 + last_temp=0 mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1` while true do @@ -82,7 +82,7 @@ CHECKTEMP_SERVICE(){ echo "alert sent" last_temp=1 fi - [ "$last_temp" == "1" ] && echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert + [ "$last_temp" == "0" ] && echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert; last_temp=1 echo "($datetime) normal: $temp_f°F" fi