From 96624271a291ee4f01db6340e5cd35b95cd70960 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 26 Dec 2023 13:45:28 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 529abb47..a8459546 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -120,11 +120,11 @@ CHECKTEMPSENSOR(){ elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then echo "H1: ${1}" - if [[ "${1}" = %"CPU"% ]]; then + if [[ "${1}" = *"CPU"* ]]; then echo 1 temp_c=$(vcgencmd measure_temp) temp_c=${temp_c%\'*}; temp_c=${temp_c#*=} - elif [[ "${1}" = %"FAN"% ]]; then + elif [[ "${1}" = *"FAN"* ]]; then echo 2 temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) fi @@ -155,7 +155,7 @@ CHECKTEMPSENSOR(){ else if [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ]; then temp_f=$(echo "scale=2; $temp_c/1" | bc -l) - elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ] && [[ "${1}" = %"FAN"% ]]; then + elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ] && [[ "${1}" = *"FAN"* ]]; then temp_f=${temp_c} else temp_f=$(bc <<< "scale=2; ${temp_c}*1.8+32")