Update powerwall.sh

This commit is contained in:
2023-10-30 15:05:46 -05:00
parent f21329cbe2
commit e4e2c4dc0b

View File

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