Update powerwall.sh

This commit is contained in:
2022-09-03 14:42:38 -05:00
parent 09b6ae2628
commit acc909db3f

View File

@@ -56,14 +56,14 @@ CHECKTEMP_SERVICE(){
[ $temp_diff -lt 0 ] && temp_diff=$(($temp_diff * -1))
if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then
if [ [ $temp_diff -gt 1 ] || [ "$last_temp" = "0" ] ]; then
if [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ]; then
echo "($temp_diff) WARNING TEMP: $temp_f°F" | mail -s "${1} TEMP WARNING" $email_alert
last_temp=$temp_f
fi
echo "($temp_d @ $temp_t) WARNING: $temp_f°F"
elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then
if [ [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ] ]; then
if [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ]; then
echo "CRITICAL TEMP: $temp_f°F" | mail -s "${1} TEMP CRITICAL" $email_alert
last_temp=$temp_f
fi