WeatherAsHtml() extended to 5-day-forecast (since Yahoo now provides such)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3291 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2013-06-15 20:45:51 +00:00
parent e159ba6974
commit e86a98614a

View File

@ -484,8 +484,8 @@ WeatherAsHtml($)
ReadingsVal($d, "temp_c", ""), ReadingsVal($d, "humidity", ""), ReadingsVal($d, "temp_c", ""), ReadingsVal($d, "humidity", ""),
ReadingsVal($d, "wind_condition", "")); ReadingsVal($d, "wind_condition", ""));
for(my $i=1; $i<=2; $i++) { for(my $i=1; $i<=5; $i++) {
# Yahoo provides only 2 days. # Yahoo provides 5 days since June 2013 (previouly 2 days)
#next if (ReadingsVal($d, "fc${i}_code", "") eq ""); # MH skip non existent entries #next if (ReadingsVal($d, "fc${i}_code", "") eq ""); # MH skip non existent entries
$ret .= sprintf('<tr><td width=%d>%s</td><td>%s: %s<br>min %s°C max %s°C</td></tr>', $ret .= sprintf('<tr><td width=%d>%s</td><td>%s: %s<br>min %s°C max %s°C</td></tr>',