Update powerwall.sh

This commit is contained in:
2023-05-14 21:40:15 -05:00
parent 40d2fd1006
commit bbe5ec94f0

View File

@@ -65,8 +65,11 @@ CHECKTEMPSENSOR(){
else
echo -en "${idsCL[Green]}Normal - ($temp_f°F)${idsCL[Default]}"
fi
c=0; spc=''; spc1=`expr 13 - ${#temp_f} - 2`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -e "${spc}${idsCL[Green]}<=$(expr $(echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1) - 1)°F${idsCL[Default]} / ${idsCL[Yellow]}$(echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1)°F${idsCL[Default]} / ${idsCL[Red]}$(echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2)°F${idsCL[Default]}"
c=0; spcn=''; spc1=`expr 6 - ${#temp_warn} - 3`; until [ $c = ${spc1} ]; do spcn="${spcn} "; c=`expr $c + 1`; done
c=0; spcw=''; spc1=`expr 6 - ${#temp_warn} - 2`; until [ $c = ${spc1} ]; do spcw="${spcw} "; c=`expr $c + 1`; done
echo -e "${spc}${idsCL[Green]}<=$(expr ${temp_warn} - 1)°F${idsCL[Default]}${spcn}/ ${idsCL[Yellow]}${temp_warn}°F${idsCL[Default]}${spcw}/ ${idsCL[Red]}${temp_crit}°F${idsCL[Default]}"
fi
}