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}]} }