From 7af11f15a646ad79bbc6a5160202844900815d11 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 11 Sep 2022 14:44:42 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerwall.sh b/powerwall.sh index a8f3b934..fdc0e555 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -120,7 +120,7 @@ CHECKACV_SERVICE(){ [ $volt_diff -lt 0 ] && volt_diff=$(($volt_diff * -1)) if [ ${INPUTACV%.*} -ge ${min_volt} ]; then echo "($datetime) normal voltage: ${INPUTACV}V" - if [ $volt_diff -gt 1 ]; then + if [ $last_volt -lt ${min_volt} ]; then echo -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "POWER NOMINAL AGAIN" $email_alert elif [ "$last_volt" = "0" ]; then echo -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert