Update powerwall.sh
This commit is contained in:
@@ -102,7 +102,6 @@ CHECKTEMPSENSOR(){
|
|||||||
if [ "${PW_SENSOR_TYPE[${1}]}" != "esxi" ]; then
|
if [ "${PW_SENSOR_TYPE[${1}]}" != "esxi" ]; then
|
||||||
average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays})
|
average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays})
|
||||||
else
|
else
|
||||||
echo "HERE: ${5}"
|
|
||||||
average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays} ${5})
|
average=$(AVERAGETEMP ${PW_SENSOR_ID[${1}]} ${avgdays} ${5})
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -173,6 +172,7 @@ AVERAGETEMP(){
|
|||||||
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'"))
|
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'"))
|
||||||
entityid=${entityid[1]}
|
entityid=${entityid[1]}
|
||||||
WHERE="sensorid=${sensorid} AND entity=${entityid}"
|
WHERE="sensorid=${sensorid} AND entity=${entityid}"
|
||||||
|
echo "HERE:${1} - ${2} - ${3} - ${entityid}"
|
||||||
else
|
else
|
||||||
WHERE="sensorid=${sensorid}"
|
WHERE="sensorid=${sensorid}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user