diff --git a/contrib/DS_Starter/76_SolarForecast.pm b/contrib/DS_Starter/76_SolarForecast.pm index 1ce672413..d6322989f 100644 --- a/contrib/DS_Starter/76_SolarForecast.pm +++ b/contrib/DS_Starter/76_SolarForecast.pm @@ -117,7 +117,8 @@ BEGIN { # Versions History intern my %vNotesIntern = ( - "0.21.0" => "25.03.2021 event management, move DWD values one hour to the future, some more corrections ", + "0.23.0" => "25.03.2021 change attr layoutType ", + "0.22.0" => "25.03.2021 event management, move DWD values one hour to the future, some more corrections ", "0.21.0" => "24.03.2021 event management ", "0.20.0" => "23.03.2021 new sub CircularVal, NexthoursVal, some fixes ", "0.19.0" => "22.03.2021 new sub HistoryVal, some fixes ", @@ -389,7 +390,7 @@ sub Initialize { "htmlStart ". "htmlEnd ". "interval ". - "layoutType:pv,co,pvco,diff ". + "layoutType:single,double,diff ". "maxVariancePerDay ". "maxPV ". "numHistDays:$cda ". @@ -1984,7 +1985,7 @@ sub forecastGraphic { my $html_start = AttrVal ($name, 'htmlStart', undef ); # beliebige HTML Strings die vor der Grafik ausgegeben werden my $html_end = AttrVal ($name, 'htmlEnd', undef ); # beliebige HTML Strings die nach der Grafik ausgegeben werden - my $lotype = AttrVal ($name, 'layoutType', 'pv' ); + my $lotype = AttrVal ($name, 'layoutType', 'single' ); my $kw = AttrVal ($name, 'Wh/kWh', 'Wh' ); $height = AttrNum ($name, 'beamHeight', 200 ); @@ -2220,15 +2221,15 @@ sub forecastGraphic { $hfcg->{0}{beam2} = ($beam2cont eq 'forecast') ? $val1 : ($beam2cont eq 'real') ? $val2 : ($beam2cont eq 'consumption') ? $val3 : $val4; $hfcg->{0}{diff} = $hfcg->{0}{beam1} - $hfcg->{0}{beam2}; - $lotype = 'pv' if ($beam1cont eq $beam2cont); # User Auswahl überschreiben wenn beide Werte die gleiche Basis haben ! + $lotype = 'single' if ($beam1cont eq $beam2cont); # User Auswahl überschreiben wenn beide Werte die gleiche Basis haben ! ########################################################### # get consumer list and display it in portalGraphics ########################################################### for (@pgCDev) { my ($itemName, undef) = split(':',$_); - $itemName =~ s/^\s+|\s+$//gx; #trim it, if blanks were used - $_ =~ s/^\s+|\s+$//gx; #trim it, if blanks were used + $itemName =~ s/^\s+|\s+$//gx; # trim it, if blanks were used + $_ =~ s/^\s+|\s+$//gx; # trim it, if blanks were used ################################## #check if listed device is planned @@ -2276,7 +2277,7 @@ sub forecastGraphic { $maxVal = !$maxVal ? $hfcg->{0}{beam1} : $maxVal; # Startwert wenn kein Wert bereits via attr vorgegeben ist - my $maxCon = $hfcg->{0}{beam1}; # für Typ co + my $maxCon = $hfcg->{0}{beam1}; my $maxDif = $hfcg->{0}{diff}; # für Typ diff my $minDif = $hfcg->{0}{diff}; # für Typ diff @@ -2438,12 +2439,12 @@ sub forecastGraphic { # Der zusätzliche Offset durch $fsize verhindert bei den meisten Skins # dass die Grundlinie der Balken nach unten durchbrochen wird - if ($lotype eq 'pv') { + if ($lotype eq 'single') { $he = int(($maxVal-$hfcg->{$i}{beam1}) / $maxVal*$height) + $fsize; $z3 = int($height + $fsize - $he); } - if ($lotype eq 'pvco') { + if ($lotype eq 'double') { # Berechnung der Zonen # he - freier der Raum über den Balken. fsize wird nicht verwendet, da bei diesem Typ keine Zahlen über den Balken stehen # z2 - der Ertrag ggf mit Icon @@ -2452,7 +2453,7 @@ sub forecastGraphic { $maxVal = $maxCon if ($maxCon > $maxVal); # wer hat den größten Wert ? - if ($hfcg->{$i}{beam1} > $hfcg->{$i}{beam2}) { # pv oben , co unten + if ($hfcg->{$i}{beam1} > $hfcg->{$i}{beam2}) { # Beam1 oben , Beam2 unten $z2 = $hfcg->{$i}{beam1}; $z3 = $hfcg->{$i}{beam2}; } else { # tauschen, Verbrauch ist größer als Ertrag @@ -2527,9 +2528,7 @@ sub forecastGraphic { $ret .="