diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 2927ea222..4d082c311 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -311,8 +311,8 @@ my %htitles = ( DE => qq{undefiniert} }, dela => { EN => qq{delayed}, DE => qq{verzoegert} }, - cnsm => { EN => qq{Consumer Control}, - DE => qq{Verbrauchersteuerung} }, + cnsm => { EN => qq{Consumer}, + DE => qq{Verbraucher} }, eiau => { EN => qq{On/Off}, DE => qq{Ein/Aus} }, auto => { EN => qq{Automatic}, @@ -4451,15 +4451,36 @@ sub _forecastGraphicConsumerLegend { my $lang = $paref->{lang}; my $dstyle = $paref->{dstyle}; # TD-Style - my ($staticon); + my $staticon; ## Tabelle Start ################# - my $ctable = qq{}; + my $ctable = qq{
}; $ctable .= qq{}; - $ctable .= qq{}; + + $ctable .= qq{}; + $ctable .= qq{}; + $ctable .= qq{}; + $ctable .= qq{}; + + my $cnum = @{$consumersref}; + if($cnum > 1) { + $ctable .= qq{}; + $ctable .= qq{}; + $ctable .= qq{}; + $ctable .= qq{}; + } + else { + $ctable .= qq{}; + $ctable .= qq{}; + $ctable .= qq{}; + $ctable .= qq{}; + } + $ctable .= qq{}; - + + my $modulo = 1; + for my $c (@{$consumersref}) { my $cname = ConsumerVal ($hash, $c, "name", ""); # Name des Consumerdevices my $calias = ConsumerVal ($hash, $c, "alias", $cname); # Alias des Consumerdevices @@ -4490,7 +4511,7 @@ sub _forecastGraphicConsumerLegend { my $swicon = q{}; my $auicon = q{}; - $ctable .= qq{}; + $ctable .= qq{} if($modulo % 2); if(!$auto) { $staticon = FW_makeImage('ios_off_fill@red', $htitles{iaaf}{$lang}); @@ -4514,15 +4535,25 @@ sub _forecastGraphicConsumerLegend { if ($clegendstyle eq 'icon') { $cicon = FW_makeImage($cicon); - $ctable .= ""; + + $ctable .= ""; + $ctable .= ""; + $ctable .= ""; + $ctable .= ""; } else { my (undef,$co) = split('\@',$cicon); $co = '' if (!$co); - $ctable .= ""; + + $ctable .= ""; + $ctable .= ""; + $ctable .= ""; + $ctable .= ""; } - $ctable .= qq{}; + $ctable .= qq{} if(!($modulo % 2)); + + $modulo++; } $ctable .= qq{
$htitles{cnsm}{$lang}$htitles{eiau}{$lang}$htitles{auto}{$lang} $htitles{cnsm}{$lang} $htitles{eiau}{$lang} $htitles{auto}{$lang} $htitles{cnsm}{$lang} $htitles{eiau}{$lang} $htitles{auto}{$lang}                                    
$calias$cicon$swicon$auicon$calias $cicon $swicon $auicon $calias $swicon$auicon$calias $swicon $auicon
};