diff --git a/fhem/CHANGED b/fhem/CHANGED index 666bce821..dcd20d76b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 76_SolarForecast: design options for graphicHeaderOwnspec - feature: 76_SolarForecast: new attr ctrlGenPVdeviation - feature: 70_ESCVP21net: add reading stateP for on/off - feature: 76_SolarForecast: allow key 'noshow' more values, KI improves diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index 69e4d1ded..c24a5c4ce 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -144,6 +144,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.0.7" => "21.10.2023 more design options for graphicHeaderOwnspec and a possible line title ", "1.0.6" => "19.10.2023 new attr ctrlGenPVdeviation ", "1.0.5" => "11.10.2023 new sub _aiGetSpread for estimate AI results stepwise, allow key 'noshow' values 0,1,2,3 ". "calculate conForecastTillNextSunrise accurate to the minute ", @@ -9084,9 +9085,21 @@ sub __createOwnSpec { return if(!$spec || !$show); + my @fields = split (/\s+/sx, $spec); + + my (@cats, @vals); + + for my $f (@fields) { + if ($f =~ /^\#(.*)/xs) { + push @cats, $1; + next; + } + + push @vals, $f; + } + my $ownv; - my @vals = split (/\s+/sx, $spec); - my $rows = ceil (scalar(@vals) / $vinr); + my $rows = ceil (scalar(@vals) / $vinr); my $col = 0; for (my $i = 1 ; $i <= $rows; $i++) { @@ -9098,7 +9111,7 @@ sub __createOwnSpec { } $ownv .= ""; - $ownv .= ""; + $ownv .= "".($cats[$i-1] ? ''.$cats[$i-1].'' : '').""; $ownv .= "".$h->{0}{label}.": ".ReadingsVal ($name,$h->{0}{rdg},'')."" if($h->{0}{label}); $ownv .= "".$h->{1}{label}.": ".ReadingsVal ($name,$h->{1}{rdg},'')."" if($h->{1}{label}); $ownv .= "".$h->{2}{label}.": ".ReadingsVal ($name,$h->{2}{rdg},'')."" if($h->{2}{label}); @@ -15911,23 +15924,34 @@ to ensure that the system configuration is correct.
  • graphicHeaderOwnspec <Label>:<Reading> <Label>:<Reading> ...
    - Display of any reading values of the device. The values to be displayed are separated by spaces. - Each value is to be defined by a label and the corresponding reading connected by ":". - The input can be multiline. Spaces in the label are to be inserted by "&nbsp;", a line break - by "<br>". + Display of any reading values of the device.
    + The values to be displayed are separated by spaces. + Four values (fields) are displayed per line.
    + The input can be made in multiple lines.

    + + Each value is to be defined by a label and the corresponding reading connected by ":".
    + Spaces in the label are to be inserted by "&nbsp;", a line break by "<br>".
    + An empty field in a line is created by ":".
    + A line title can be inserted by specifying "#:<Text>", an empty title by entering "#".

  • @@ -17738,23 +17762,34 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden.
  • graphicHeaderOwnspec <Label>:<Reading> <Label>:<Reading> ...
    - Anzeige beliebiger Readingswerte des Devices. Die anzuzeigenden Werte werden durch Leerzeichen getrennt. - Jeder Wert ist jeweils durch ein Label und das dazugehörige Reading verbunden durch ":" zu definieren. - Die Eingabe kann mehrzeilig erfolgen. Leerzeichen im Label sind durch "&nbsp;" einzufügen, ein Zeilenumbruch - durch "<br>". + Anzeige beliebiger Readingswerte des Devices.
    + Die anzuzeigenden Werte werden durch Leerzeichen getrennt. + Es werden vier Werte (Felder) pro Zeile dargestellt.
    + Die Eingabe kann mehrzeilig erfolgen.

    + + Jeder Wert ist jeweils durch ein Label und das dazugehörige Reading verbunden durch ":" zu definieren.
    + Leerzeichen im Label sind durch "&nbsp;" einzufügen, ein Zeilenumbruch durch "<br>".
    + Ein leeres Feld in einer Zeile wird durch ":" erzeugt.
    + Ein Zeilentitel kann durch Angabe von "#:<Text>" eingefügt werden, ein leerer Titel durch die Eingabe von "#".