From 98e4e78a93490a6909e74a969f41df36be2a1767 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 14 Dec 2023 17:50:33 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 85714f70..b3fe5849 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -107,7 +107,7 @@ CHECKTEMPSENSOR(){ echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then - temp_c=$(GET_LACROSSE_INFO "${1}") + temp_c=$(GET_LACROSSE_INFO "${1}" "probe_temp") elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then temp_c=$(vcgencmd measure_temp) @@ -249,7 +249,10 @@ CHECKTEMP_SERVICE(){ mqtt_message=`${mqtt_conn} -t tele/${SENSOR}/SENSOR -C 1` echo ${mqtt_message} | cut -d':' -f 7 | cut -d',' -f 1 | read temp_h echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c - + + elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then + temp_c=$(GET_LACROSSE_INFO "${1}" "probe_temp") + elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then temp_c=$(vcgencmd measure_temp) temp_c=${temp_c%\'*}; temp_c=${temp_c#*=} @@ -534,7 +537,7 @@ GET_LACROSSE_INFO(){ # echo "'${key}' => '${val}'" done - echo ${DEVICE_INFO['probe_temp']} + echo ${DEVICE_INFO[${2}]} }