Update powerwall.sh

This commit is contained in:
2023-12-03 18:14:49 -06:00
parent d774ce0e47
commit c55bd3eecd

View File

@@ -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