diff --git a/powerwall.sh b/powerwall.sh index 4c43175d..a8f3b934 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -122,7 +122,7 @@ CHECKACV_SERVICE(){ echo "($datetime) normal voltage: ${INPUTACV}V" if [ $volt_diff -gt 1 ]; then echo -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "POWER NOMINAL AGAIN" $email_alert - if [ "$last_volt" = "0" ]; then + elif [ "$last_volt" = "0" ]; then echo -e "($datetime) Normal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert fi last_volt=1