From 9029f080325b03c152244997469822c7edea3f0f Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 3 Sep 2022 14:28:11 -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 407fb90d..331fac87 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -52,7 +52,7 @@ CHECKTEMP_SERVICE(){ echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit - temp_diff=$((${last_temp%.*} - ${temp_f%.*})) + temp_diff=$((last_temp%.* - temp_f%.*)) [ $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