Update powerwall.sh
This commit is contained in:
@@ -19,7 +19,7 @@ CHECKTEMP(){
|
|||||||
cw=20;
|
cw=20;
|
||||||
echo
|
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]}"
|
||||||
echo -e "${idsCL[Yellow]}Sensor Temperature(s) Current / 7DayAVG ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
echo -e "${idsCL[Cyan]}Sensor Temperature(s) Current / 7DayAVG ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
||||||
DIVIDER . yellow 85
|
DIVIDER . yellow 85
|
||||||
if [ "${1}" != "" ]; then
|
if [ "${1}" != "" ]; then
|
||||||
# reading=$(CHECKTEMPSENSOR ${1})
|
# reading=$(CHECKTEMPSENSOR ${1})
|
||||||
@@ -28,7 +28,7 @@ CHECKTEMP(){
|
|||||||
|
|
||||||
for SENSOR in ${!SENSOR_ID[@]}; do
|
for SENSOR in ${!SENSOR_ID[@]}; do
|
||||||
if [[ "${SENSOR}" = *"${1}"* ]]; then
|
if [[ "${SENSOR}" = *"${1}"* ]]; then
|
||||||
echo -en "${idsCL[LightYellow]}Pulling '${SENSOR}' Data..."
|
echo -en "${idsCL[Yellow]}Pulling '${SENSOR}' Data..."
|
||||||
reading=$(CHECKTEMPSENSOR ${SENSOR})
|
reading=$(CHECKTEMPSENSOR ${SENSOR})
|
||||||
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -e "\r\033[K${idsCL[LightCyan]}${SENSOR}${spc}${idsCL[Default]}: ${reading}"
|
echo -e "\r\033[K${idsCL[LightCyan]}${SENSOR}${spc}${idsCL[Default]}: ${reading}"
|
||||||
@@ -37,7 +37,7 @@ CHECKTEMP(){
|
|||||||
|
|
||||||
else
|
else
|
||||||
for SENSOR in ${!SENSOR_ID[@]}; do
|
for SENSOR in ${!SENSOR_ID[@]}; do
|
||||||
echo -en "${idsCL[LightYellow]}Pulling '${SENSOR}' Data..."
|
echo -en "${idsCL[Yellow]}Pulling '${SENSOR}' Data..."
|
||||||
reading=$(CHECKTEMPSENSOR ${SENSOR})
|
reading=$(CHECKTEMPSENSOR ${SENSOR})
|
||||||
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -e "\r\033[K${idsCL[LightCyan]}${SENSOR}${spc}${idsCL[Default]}: ${reading}"
|
echo -e "\r\033[K${idsCL[LightCyan]}${SENSOR}${spc}${idsCL[Default]}: ${reading}"
|
||||||
|
|||||||
Reference in New Issue
Block a user