diff --git a/fhem/FHEM/59_PROPLANTA.pm b/fhem/FHEM/59_PROPLANTA.pm
index 16d3774c4..78c97c0d3 100644
--- a/fhem/FHEM/59_PROPLANTA.pm
+++ b/fhem/FHEM/59_PROPLANTA.pm
@@ -125,6 +125,15 @@ my $curReadingType = 0;
,"stark" => 3
);
+sub
+get_wday($)
+{
+ my ($date) = @_;
+ my @wday_txt = qw(So Mo Di Mi Do Fr Sa);
+ my @th=localtime $date;
+
+ return $wday_txt [$th[6]];
+}
# here HTML::text/start/end are overridden
sub text
@@ -681,16 +690,23 @@ PROPLANTA_Html($)
$isday = 1; #($hour>6 && $hour<19);
}
- my $ret = "
";
- $ret .= sprintf '%s |
|
', $defs{$d}{DEF};
-
-# $ret .= sprintf('%s | %s %s temp: %s °C, hum %s wind: %s km/h %s pressure: %s bar visibility: %s km |
',
-# WWOIconIMGTag(ReadingsVal($d, "icon", ""),$uselocal,$isday),
-# ReadingsVal($d, "localObsDateTime", ""),ReadingsVal($d, "weatherDesc", ""),
-# ReadingsVal($d, "temp_C", ""), ReadingsVal($d, "humidity", ""),
-# ReadingsVal($d, "windspeedKmph", ""), ReadingsVal($d, "winddir16Point", ""),
-# ReadingsVal($d, "pressure", ""),ReadingsVal($d, "visibility", ""));
-
+ my $ret = "";
+ $ret .= sprintf '%s |
', $defs{$d}{DEF};
+ $ret .= sprintf 'Tag | morgens | tags | abends | nachts | min | max | Regen tags | Frost |
', $defs{$d}{DEF};
+ $ret .= "";
+# define MyForecast weblink htmlCode { PROPLANTA_Html("ProPlanta_Wetter") }
+ for(my $i=0; $i<=2; $i++) {
+ $ret .= sprintf('%s | %s
| %s
| %s
| %s
| %s°C | %s°C | %s %% | %s |
',
+ "Tag ".$i,
+ ReadingsVal($d, "fc".$i."_weatherMorning", ""), ReadingsVal($d, "fc".$i."_weatherMorningIcon", ""),
+ ReadingsVal($d, "fc".$i."_weatherDay", ""), ReadingsVal($d, "fc".$i."_weatherDayIcon", ""),
+ ReadingsVal($d, "fc".$i."_weatherEvening", ""), ReadingsVal($d, "fc".$i."_weatherEveningIcon", ""),
+ ReadingsVal($d, "fc".$i."_weatherNight", ""), ReadingsVal($d, "fc".$i."_weatherNightIcon", ""),
+ ReadingsVal($d, "fc".$i."_tempMin", ""), ReadingsVal($d, "fc".$i."_tempMax", ""),
+ ReadingsVal($d, "fc".$i."_chOfRainDay", ""),
+ ReadingsVal($d, "fc".$i."_frost", "") ? "ja" : "nein"
+ );
+ }
# for(my $i=0; $i<=4; $i++) {
# $ret .= sprintf('%s | %s: %s min %s °C max %s °C wind: %s km/h %s precip: %s mm |
',
# WWOIconIMGTag(ReadingsVal($d, "fc${i}_weatherDayIcon", ""),$uselocal,$isday),
@@ -699,7 +715,7 @@ PROPLANTA_Html($)
# ReadingsVal($d, "fc${i}_tempMinC", ""), ReadingsVal($d, "fc${i}_tempMaxC", ""),
# }
- $ret .= "
";
+ $ret .= "
";
return $ret;
}
@@ -743,6 +759,12 @@ PROPLANTA_Html($)
Optional. Possible values: de (default), at, ch, fr, it
+ The function PROPLANTA_Html
creates a HTML code for a 3 day weather forecast.
+
+ Example:
+
+ define HTMLForecast weblink htmlCode { OPENWEATHER_Html("ProPlanta_Wetter") }
+
@@ -841,6 +863,12 @@ PROPLANTA_Html($)
Optional. Mögliche Werte: de (Standard), at, ch, fr, it
+ Über die Funktion PROPLANTA_Html
wird ein HTML-Code für eine 3-Tages-Vorhersage erzeugt.
+
+ Beispiel:
+
+ define HTMLVorschau weblink htmlCode { OPENWEATHER_Html("ProPlanta_Wetter") }
+