diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 40bd4524..bb559681 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -326,15 +326,13 @@ CHECKTEMP_SERVICE(){ temp_h=$(echo ${INFO} | jq -r '.device0 .obs[].humidity') elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then - if [[ "${1}" = *"CPU"* ]]; then + if [[ "${SENSOR}" = *"CPU"* ]]; then temp_c=$(vcgencmd measure_temp) temp_c=${temp_c%\'*}; temp_c=${temp_c#*=} temp_h='' - elif [[ "${1}" = *"FAN"* ]]; then + elif [[ "${SENSOR}" = *"FAN"* ]]; then temp_c=$(cat /sys/class/hwmon/hwmon2/fan1_input) temp_h='' - echo "EX: ${temp_c}" - cat /sys/class/hwmon/hwmon2/fan1_input fi elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "remotesystem" ]; then