Update temp.inc.sh

This commit is contained in:
2023-12-14 17:50:33 -06:00
parent 700738fdf1
commit 98e4e78a93

View File

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