Update powerwall.sh

This commit is contained in:
2023-05-14 21:54:35 -05:00
parent 70b1a01543
commit 30e518a7ca

View File

@@ -16,7 +16,7 @@ VERBOSE=false
CHECKTEMP(){
cw=20;
echo
echo -e "${idsCL[Yellow]}Sensor Temperature(s) ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
echo -e "${idsCL[Yellow]}Sensor Temperature(s) ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
DIVIDER . yellow 75
if [ "${1}" != "" ]; then
# reading=$(CHECKTEMPSENSOR ${1})
@@ -66,7 +66,7 @@ CHECKTEMPSENSOR(){
echo -en "${idsCL[Green]}Normal ($temp_f°F)${idsCL[Default]}"
fi
c=0; spc=''; spc1=`expr 11 - ${#temp_f} - 2`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
c=0; spc=''; spc1=`expr 13 - ${#temp_f} - 2`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
echo -e "${spc}[ ${idsCL[Green]}<=$(expr ${temp_warn} - 1)°F${idsCL[Default]}${spcw}/ ${idsCL[Yellow]}${temp_warn}°F${idsCL[Default]}${spcw}/ ${idsCL[Red]}${temp_crit}°F${idsCL[Default]}${spcc}]"