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 echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then 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 elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
temp_c=$(vcgencmd measure_temp) temp_c=$(vcgencmd measure_temp)
@@ -250,6 +250,9 @@ CHECKTEMP_SERVICE(){
echo ${mqtt_message} | cut -d':' -f 7 | cut -d',' -f 1 | read temp_h 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 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 elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then
temp_c=$(vcgencmd measure_temp) temp_c=$(vcgencmd measure_temp)
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=} temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
@@ -534,7 +537,7 @@ GET_LACROSSE_INFO(){
# echo "'${key}' => '${val}'" # echo "'${key}' => '${val}'"
done done
echo ${DEVICE_INFO['probe_temp']} echo ${DEVICE_INFO[${2}]}
} }