Update powerwall.sh

This commit is contained in:
2023-12-03 11:13:56 -06:00
parent eea2f7066f
commit 6f7544fbf8

View File

@@ -774,8 +774,13 @@ CHECKPOWER(){
average=$(AVERAGEPOWER ${PW_POWERSENSOR_ID[${SENSOR}]} ${avgdays}); average_disp="${idsCL[LightYellow]} `IDS_NUMBER_FORMAT ${average}`'watts"
echo -en "\r\033[K"; echo -en "${MSG}${idsCL[LightYellow]}${average_disp}"
elif [ "${HOST_WATTS}" != "0" ]; then
[ "${PS1}" == "" ] && PS1="0.0" || (PS1=`echo "scale=1; ${PS1}/10" | bc`; (( $(bc <<<"${PS1} < 1") )) && [[ "${PS1}" = *"."* ]] && PS1="0${PS1}")
[ "${PS2}" == "" ] && PS2="0.0" || (PS2=`echo "scale=1; ${PS2}/10" | bc` && (( $(bc <<<"${PS2} < 1") )) && [[ "${PS2}" = *"."* ]] && PS2="0${PS2}")
[ "${PS1}" == "" ] && PS1="0.0" || PS1=`echo "scale=1; ${PS1}/10" | bc`; (( $(bc <<<"${PS1} < 1") )) && [[ "${PS1}" = *"."* ]] && PS1="0${PS1}"
if [ "${PS2}" == "" ]; then
PS2="0.0"
else
PS2=`echo "scale=1; ${PS2}/10" | bc`
(( $(bc <<<"${PS2} < 1") )) && [[ "${PS2}" = *"."* ]] && PS2="0${PS2}"
fi
echo -en "${idsCL[LightCyan]} [PS1=${PS1}'A, PS2=${PS2}'A]"
fi
echo -e "${idsCL[Default]}"