From 67028246f68083d7a8c69115eb92657c84bfce0c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 14 Aug 2023 19:48:12 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 33b10b49..044f9489 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -104,11 +104,11 @@ CHECKTEMPSENSOR(){ if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then temp_f=`echo "scale=2; ${temp_c}*1.8 + 32" | bc` #echo "$temp_c -> $temp_f" - c=0; spct=''; spc1=`expr 6 - ${#temp_f}`; until [ $c = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done - # c=0; spca=''; spc1=`expr 6 - ${#average}`; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr ${c} + 1`; done + # c=0; spct=''; spc1=`expr 6 - ${#temp_f}`; until [ $c = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done + c=0; spca=''; spc1=`expr 6 - ${#average}`; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr ${c} + 1`; done if [ "${average}" == "" ]; then - averagedisp='' + averagedisp="${idsCL[Green]}" elif [ $(bc -l <<< "${average} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${average} < ${temp_crit}") -eq 1 ]; then averagedisp="${idsCL[Yellow]}${average}'F" elif [ $(bc -l <<< "${average} >= ${temp_crit}") -eq 1 ]; then