little change
This commit is contained in:
parent
a5493e992d
commit
31256f1a17
@ -832,25 +832,28 @@ sub WeatherAsHtmlH($;$$) {
|
|||||||
ReadingsVal( $d, "humidity", "" )
|
ReadingsVal( $d, "humidity", "" )
|
||||||
);
|
);
|
||||||
for ( my $i = 1 ; $i < $items ; $i++ ) {
|
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( '<td class="weatherMin">min %s°C</td>',
|
$ret .= sprintf( '<td class="weatherMin">min %s°C</td>',
|
||||||
ReadingsVal( $d, "${fc}${i}_low_c", " - " ) );
|
ReadingsVal( $d, "${fc}${i}_low_c", " - " ) );
|
||||||
}else{
|
}
|
||||||
$ret .= sprintf( '<td class="weatherMin"> %s°C</td>',
|
else {
|
||||||
ReadingsVal( $d, "${fc}${i}_temperature", " - " ) );
|
$ret .= sprintf( '<td class="weatherMin"> %s°C</td>',
|
||||||
}
|
ReadingsVal( $d, "${fc}${i}_temperature", " - " ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret .= '</tr>';
|
$ret .= '</tr>';
|
||||||
|
|
||||||
# wind | max
|
# wind | max
|
||||||
$ret .= sprintf( '<tr><td class="weatherMax">%s</td>',
|
$ret .= sprintf( '<tr><td class="weatherMax">%s</td>',
|
||||||
ReadingsVal( $d, "wind_condition", "" ) );
|
ReadingsVal( $d, "wind_condition", "" ) );
|
||||||
for ( my $i = 1 ; $i < $items ; $i++ ) {
|
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( '<td class="weatherMax">max %s°C</td>',
|
$ret .= sprintf( '<td class="weatherMax">max %s°C</td>',
|
||||||
ReadingsVal( $d, "${fc}${i}_high_c", " - " ) );
|
ReadingsVal( $d, "${fc}${i}_high_c", " - " ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret .= "</tr></table>";
|
$ret .= "</tr></table>";
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user