From ee002c12ec6db9f68be8f09ec05e38583da0e955 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 14 May 2023 17:33:12 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index b8097e96..493d8ca7 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -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 }