Update powerwall.sh

This commit is contained in:
2023-11-04 11:10:57 -05:00
parent e471a149cb
commit 55a29bae5b

View File

@@ -99,10 +99,10 @@ CHECKTEMPSENSOR(){
echo ${PW_TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
if [ "${6}" != "noavg" ]; then
[ "${6}" != "" ] && [[ "${6}" =~ ^[0-9]+$ ]] && avgdays=${6} || avgdays=3
echo "HERE: ${1}-${PW_SENSOR_ID[${1}]}"
if [ "${PW_SENSOR_TYPE[${1}]}" != "esxi" ]; then
average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays})
else
echo "HERE: ${5}"
average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays} ${5})
fi
else