diff --git a/powerwall.sh b/powerwall.sh index d4d25bb4..71707523 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -432,7 +432,7 @@ Previous Temp: ${last_temp[${SENSOR}]}'F" else wait=300 fi - if [ ${lastinsert} -ge ${wait} ]; then + if [ ${lastinsert} -ge ${wait} ] && [ "${PW_SENSOR_ID[${SENSORa}]}" != "" ]; then if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${vSENSOR// /_}' AND sensorid='${PW_SENSOR_ID[${SENSORa}]}'")) if [ "${entityid[1]}" == "" ]; then