From 7c4469664041b9853065a37ccfb76bdf19be63c2 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 14 Dec 2023 17:36:52 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 9cc35ee4..ff589fd1 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -133,12 +133,13 @@ CHECKTEMPSENSOR(){ fi if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then - [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || [ "${1}" != "ServerRoomLA" ] && temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32") - (( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]] && temp_f="0${temp_f}" if [ "${1}" == "ServerRoomTH" ]; then temp_f=`echo "scale=1; ${temp_f}+${PW_ServerRoomTH_Dev}" | bc` elif [ "${1}" == "ServerRoomLA" ]; then temp_f=${temp_c} + else + [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32") + (( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]] && temp_f="0${temp_f}" fi # echo "HERE: '${temp_c}' -> '${temp_f}'" # echo -en ""