diff --git a/powerwall.sh b/powerwall.sh index bea839e0..1e83ab9d 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -130,7 +130,7 @@ CHECKTEMP(){ 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 + if [ "${6}" != "noavg" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]; then [ "${6}" != "" ] && [[ "${6}" =~ ^[0-9]+$ ]] && avgdays=${6} || avgdays=3 if [ "${PW_SENSOR_TYPE[${1}]}" != "esxi" ]; then average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays})