diff --git a/59_Weather.pm b/59_Weather.pm index fccecab..e9ce097 100755 --- a/59_Weather.pm +++ b/59_Weather.pm @@ -832,25 +832,28 @@ sub WeatherAsHtmlH($;$$) { ReadingsVal( $d, "humidity", "" ) ); for ( my $i = 1 ; $i < $items ; $i++ ) { - if(defined($h->{READINGS}->{"${fc}${i}_low_c"}) and $h->{READINGS}->{"${fc}${i}_low_c"}){ + if(defined($h->{READINGS}->{"${fc}${i}_low_c"}) and $h->{READINGS}->{"${fc}${i}_low_c"}){ $ret .= sprintf( 'min %s°C', ReadingsVal( $d, "${fc}${i}_low_c", " - " ) ); - }else{ - $ret .= sprintf( ' %s°C', - ReadingsVal( $d, "${fc}${i}_temperature", " - " ) ); - } + } + else { + $ret .= sprintf( ' %s°C', + ReadingsVal( $d, "${fc}${i}_temperature", " - " ) ); + } } + $ret .= ''; # wind | max $ret .= sprintf( '%s', ReadingsVal( $d, "wind_condition", "" ) ); for ( my $i = 1 ; $i < $items ; $i++ ) { - if(defined($h->{READINGS}->{"${fc}${i}_high_c"}) and $h->{READINGS}->{"${fc}${i}_high_c"}){ + if(defined($h->{READINGS}->{"${fc}${i}_high_c"}) and $h->{READINGS}->{"${fc}${i}_high_c"}){ $ret .= sprintf( 'max %s°C', - ReadingsVal( $d, "${fc}${i}_high_c", " - " ) ); + ReadingsVal( $d, "${fc}${i}_high_c", " - " ) ); } } + $ret .= ""; return $ret;