Update powerwall.sh

This commit is contained in:
2023-05-14 17:33:12 -05:00
parent b322bc4872
commit ee002c12ec

View File

@@ -42,12 +42,14 @@ CHECKTEMPSENSOR(){
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then
echo -e "${idsCL[LightMagenta]}WARNING - $temp_f°F${idsCL[Default]}"
echo -en "${idsCL[LightMagenta]}WARNING - $temp_f°F${idsCL[Default]}"
elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then
echo -e "${idsCL[Red]}CRITICAL - $temp_f°F${idsCL[Default]}"
echo -en "${idsCL[Red]}CRITICAL - $temp_f°F${idsCL[Default]}"
else
echo -e "${idsCL[Green]}Normal - $temp_f°F${idsCL[Default]}"
echo -en "${idsCL[Green]}Normal - $temp_f°F${idsCL[Default]}"
fi
echo -e " - (${idsCL[LightMagenta]}$(${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1)${idsCL[Red]}$(${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2)${idsCL[Default]})"
fi
}