Update powerwall.sh

This commit is contained in:
2022-09-03 14:38:02 -05:00
parent 0e411e95da
commit f3c3788d2e

View File

@@ -52,8 +52,8 @@ CHECKTEMP_SERVICE(){
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
temp_diff=$((last_temp%.* - temp_f%.*))
[ $temp_diff -lt 0 ] && temp_diff=$((temp_diff * -1))
temp_diff=$(($last_temp%.* - $temp_f%.*))
[ $temp_diff -lt 0 ] && temp_diff=$(($temp_diff * -1))
if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then
if [ [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ] ]; then