Update powerwall.sh
This commit is contained in:
@@ -19,7 +19,7 @@ CHECKTEMP(){
|
|||||||
cw=20;
|
cw=20;
|
||||||
echo
|
echo
|
||||||
# echo -e "${idsCL[Yellow]}Sensor Temperature(s) ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
# echo -e "${idsCL[Yellow]}Sensor Temperature(s) ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Cyan]}Sensor Temperature(s) Current / 7DayAVG ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
echo -e "${idsCL[Cyan]}Sensor Temperature(s) Current / 3DayAVG ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
||||||
DIVIDER . yellow 85
|
DIVIDER . yellow 85
|
||||||
if [ "${1}" != "" ]; then
|
if [ "${1}" != "" ]; then
|
||||||
# reading=$(CHECKTEMPSENSOR ${1})
|
# reading=$(CHECKTEMPSENSOR ${1})
|
||||||
@@ -48,7 +48,7 @@ CHECKTEMP(){
|
|||||||
CHECKTEMPSENSOR(){
|
CHECKTEMPSENSOR(){
|
||||||
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
||||||
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
||||||
average=$(AVERAGETEMP ${SENSOR_ID[${1}]} 7)
|
average=$(AVERAGETEMP ${SENSOR_ID[${1}]} 3)
|
||||||
|
|
||||||
if [ "${SENSOR_TYPE[${1}]}" == "mqtt" ]; then
|
if [ "${SENSOR_TYPE[${1}]}" == "mqtt" ]; then
|
||||||
mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1`
|
mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1`
|
||||||
|
|||||||
Reference in New Issue
Block a user