Update temp.inc.sh

This commit is contained in:
2023-12-14 17:19:56 -06:00
parent 8f293e1552
commit 2c73de88d5

View File

@@ -133,12 +133,9 @@ CHECKTEMPSENSOR(){
fi
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
if [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ]; then
temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32")
elif (( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]]; then
temp_f="0${temp_f}"
elif [ "${1}" == "ServerRoomTH" ]; then
temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32")
[ "${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}