Update temp.inc.sh

This commit is contained in:
2023-12-14 17:15:31 -06:00
parent 52d3824be5
commit d97804750e

View File

@@ -101,12 +101,11 @@ CHECKTEMPSENSOR(){
else
average=''
fi
echo "HERE: ${1}-${PW_SENSOR_TYPE[${1}]}"
if [ "${PW_SENSOR_TYPE[${1}]}" == "mqtt" ]; then
mqtt_message=`${mqtt_conn} -t tele/${1}/SENSOR -C 1`
echo ${mqtt_message} | cut -d':' -f 6 | cut -d',' -f 1 | read temp_c
echo "HERE: ${1} - ${temp_c}"
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
temp_c=$(GET_LACROSSE_INFO "${PW_LACROSSE_ID[${1}]}")