Update powerwall.sh

This commit is contained in:
2023-11-22 14:49:35 -06:00
parent 37a22e15e7
commit 642ee237f9

View File

@@ -554,7 +554,17 @@ CHECKPOWER(){
[[ "${OUTPUTW}" == *"."* ]] && [[ "${OUTPUTW}" != *".0"* ]] && OUTPUTW=`printf "%'.2f\n" ${OUTPUTW}` || OUTPUTW=`printf "%'.0f\n" ${OUTPUTW}`
BATTV=`echo ${INVSTATSINFO} | jq '.inputs .battV'`
BATTA=`echo ${INVSTATSINFO} | jq '.inputs .xfA'`
[[ "${BATTA}" == *"-"* ]] && BATTA_disp="${idsCL[Green]}${BATTA}'amps - Charging" || BATTA_disp="${idsCL[LightRed]}${BATTA}'amps - Discharging"
if (( $(bc <<<"${BATTV} > 54.8") )); then
if (( $(bc <<<"${BATTV} > 58") )); then
BATTA_disp="${idsCL[Green]}${BATTA}'amps - Bulk Charging"
else
BATTA_disp="${idsCL[Green]}${BATTA}'amps - Float Charging"
fi
elif [ "${BATTA}" == "-0.1"]; then
BATTA_disp="${idsCL[LightRed]}${BATTA}'amps - Standby"
else
BATTA_disp="${idsCL[LightRed]}${BATTA}'amps - Discharging"
fi
fi
echo -e "${idsCL[White]}Inverter Input Volts ${idsCL[Default]}: ${idsCL[Green]}${INPUTV}'volts"