Update powerwall.sh

This commit is contained in:
2023-12-03 15:24:12 -06:00
parent fb41055f11
commit 122c8a975d

View File

@@ -190,13 +190,13 @@ CHECKTEMPSENSOR(){
fi
fi
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
([ "${average}" != "" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]) && echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_f}'F /${spca}${averagedisp}${idsCL[Default]}" || echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_f}"
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ]; then
([ "${average}" != "" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]) && echo -en "${idsCL[Red]}CRITICAL${spct}${temp_f}'F /${spca}${averagedisp}${idsCL[Default]}" || echo -en "${idsCL[Red]}CRITICAL${spct}${temp_f}"
else
([ "${average}" != "" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]) && echo -en "${idsCL[Green]}Normal ${spct}${temp_f}'F /${spca}${averagedisp}${idsCL[Default]}" || echo -en "${idsCL[Green]}Normal ${spct}${temp_f}"
fi
# if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
# ([ "${average}" != "" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]) && echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_f}'F /${spca}${averagedisp}${idsCL[Default]}" || echo -en "${idsCL[Yellow]}WARNING ${spct}${temp_f}"
# elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ]; then
# ([ "${average}" != "" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]) && echo -en "${idsCL[Red]}CRITICAL${spct}${temp_f}'F /${spca}${averagedisp}${idsCL[Default]}" || echo -en "${idsCL[Red]}CRITICAL${spct}${temp_f}"
# else
# ([ "${average}" != "" ] && [ "${PW_SENSOR_TYPE[${1}]}" != "cpu" ]) && echo -en "${idsCL[Green]}Normal ${spct}${temp_f}'F /${spca}${averagedisp}${idsCL[Default]}" || echo -en "${idsCL[Green]}Normal ${spct}${temp_f}"
# fi
[ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && echo -en "%${idsCL[Default]}" || echo -en "'F${idsCL[Default]}"
tmp="${spct}${temp_f}"