diff --git a/powerwall.sh b/powerwall.sh index 9a6b5b67..c47b2e33 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -153,8 +153,7 @@ CHECKTEMPSENSOR(){ fi if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then - [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && echo "CPU-YES" || echo "CPU-NO" - [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && temp_f=$(bc <<< "scale=2; ${temp_c}*1") || 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) || temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32") echo "HERE: '${temp_c}' -> '${temp_f}'" # echo -en "" c=0; spct=''; spc1=`expr 6 - ${#temp_f}`; until [ ${c} = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done