Update temp.inc.sh

This commit is contained in:
2023-12-14 17:14:36 -06:00
parent 94ef137bbc
commit 52d3824be5

View File

@@ -102,12 +102,15 @@ CHECKTEMPSENSOR(){
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
elif [ "${PW_SENSOR_TYPE[${1}]}" == "lacrosse" ]; then
temp_c=$(GET_LACROSSE_INFO "${PW_LACROSSE_ID[${1}]}")
echo "HERE1: ${temp_f}"
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
temp_c=$(vcgencmd measure_temp)
@@ -141,7 +144,7 @@ CHECKTEMPSENSOR(){
temp_f=`echo "scale=1; ${temp_f}+${PW_ServerRoomTH_Dev}" | bc`
elif [ "${1}" == "ServerRoomLA" ]; then
temp_f=${temp_c}
echo "HERE: ${temp_f}"
echo "HERE2: ${temp_f}"
fi
# echo "HERE: '${temp_c}' -> '${temp_f}'"
# echo -en ""