From 365aa8f1a61c52ff899bedd28b639894c25ebafe Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 3 Sep 2022 09:27:05 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 8ca31c07..03984440 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -18,9 +18,12 @@ GETTEMP(){ mqtt_message=`mosquitto_sub -h 10.10.1.180 -t tasmota/discovery/${SENSOR_MQTTID[$1]}/sensors -u homeassistant -P 12home34assistant56 -C 1` echo $mqtt_message echo $mqtt_message | cut -d':' -f 7 | cut -d',' -f 1 | read temp_c - temp_f=`echo "scale=2; $temp*1.8 + 32" | bc` - - echo "$temp_c -> $temp_f" + if [ "$team_c" != "null" ]; then + temp_f=`echo "scale=2; $temp*1.8 + 32" | bc` + echo "$temp_c -> $temp_f" + else + echo "No temperature" + fi }