Update powerwall.sh

This commit is contained in:
2022-09-03 20:17:39 -05:00
parent be93d23255
commit ad5103c916

View File

@@ -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