diff --git a/FHEM/59_PROPLANTA.pm b/FHEM/59_PROPLANTA.pm index 037a896df..8807931bf 100644 --- a/FHEM/59_PROPLANTA.pm +++ b/FHEM/59_PROPLANTA.pm @@ -753,10 +753,11 @@ sub PROPLANTA_Aborted($) ##### noch nicht fertig ########### sub ##################################### -PROPLANTA_Html($) +PROPLANTA_Html(@) { - my ($d) = @_; + my ($d,$days) = @_; $d = "" if(!$d); + $days = 2 unless defined $days; return "$d is not a PROPLANTA instance
" if(!$defs{$d} || $defs{$d}{TYPE} ne "PROPLANTA"); @@ -774,7 +775,7 @@ PROPLANTA_Html($) $ret .= 'TagmorgenstagsueberabendsnachtsminmaxRegen tagsFrost'; $ret .= ""; # define MyForecast weblink htmlCode { PROPLANTA_Html("ProPlanta_Wetter") } - for(my $i=0; $i<=2; $i++) { + for(my $i=0; $i<=$days; $i++) { $ret .= sprintf('%s%s
%s
%s
%s
%s°C%s°C%s %%%s', ReadingsVal($d, "fc".$i."_date", ""), ReadingsVal($d, "fc".$i."_weatherMorning", ""), ReadingsVal($d, "fc".$i."_weatherMorningIcon", ""), @@ -844,11 +845,11 @@ 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. + The function PROPLANTA_Html creates a HTML code for a weather forecast for the given days (default is 3).
Example:
- define HTMLForecast weblink htmlCode { PROPLANTA_Html("ProPlanta_Wetter") } + define HTMLForecast weblink htmlCode { PROPLANTA_Html("ProPlanta_Wetter"[, days])}


@@ -954,11 +955,11 @@ 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. + Über die Funktion PROPLANTA_Html wird ein HTML-Code für eine Vorhersage für die angegebenen Anzahl Tage (standardmäßig 3) erzeugt.
Beispiel:
- define Vorschau weblink htmlCode {PROPLANTA_Html("Wetter")} + define Vorschau weblink htmlCode {PROPLANTA_Html("Wetter"[, Tage])}