diff --git a/fhem/CHANGED b/fhem/CHANGED index f1a2f720d..bf8a049b8 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: 98_DOIFtools: add RGB color values to color table - bugfix: 88_HMCCURPC: fixed bug in event timeout handling - change: 59_LuftdatenInfo: DEF change (should happen automatically) - feature: 98_DOIFtools: add getter linearColorGradient, returns a table of diff --git a/fhem/FHEM/98_DOIFtools.pm b/fhem/FHEM/98_DOIFtools.pm index 5bdbe8d57..2cb0c1c27 100644 --- a/fhem/FHEM/98_DOIFtools.pm +++ b/fhem/FHEM/98_DOIFtools.pm @@ -1495,38 +1495,39 @@ sub DOIFtools_Get($@) my ($sc,$ec,$min,$max,$step) = split(",",$value); if ($value && $sc =~ /[0-9A-F]{6}/ && $ec =~ /[0-9A-F]{6}/ && $min =~ /(-?\d+(\.\d+)?)/ && $max =~ /(-?\d+(\.\d+)?)/ && $step =~ /(-?\d+(\.\d+)?)/) { $ret .= ""; - $ret .= ""; - $ret .= ""; + $ret .= ""; - $ret .= ""; + $ret .= ""; for (my $i=$min;$i<=$max;$i+=$step) { my $col = DOIFtoolsLinColorGrad($sc,$ec,$min,$max,$i); - $ret .= ""; + $col =~ /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/; + $ret .= ""; } $ret .= "
Color Table
"; + $ret .= "
Color Table
"; for (my $i=0;$i<=255;$i++) { my $col = DOIFtoolsLinColorGrad($sc,$ec,0,255,$i); - $ret .= ""; + $ret .= "  "; } $ret .= "
ValueColor NumberColor
Value Color Number RGB values Color
".sprintf("%.1f",$i)."$col      
".sprintf("%.1f",$i)."$col ".hex($1).",".hex($2).",".hex($3)."       
\n"; return $ret; } else { - $ret = $DE ? "Syntax: + $ret = $DE ? "Falsche Eingabe:$value\nSyntax: <Startfarbnummer>,<Endfarbnummer>,<Minimalwert>,<Maximalwert>,<Schrittweite> <Startfarbnummer>, ist eine HTML-Farbnummer, Beispiel: #0000FF für Blau. -<Endfarbnummer>, , ist eine HTML-Farbnummer, Beispiel: #FF0000 für Rot. +<Endfarbnummer>, ist eine HTML-Farbnummer, Beispiel: #FF0000 für Rot. <Minimalwert>, der Minimalwert auf den die Startfarbnummer skaliert wird, Beispiel: 7. <Maximalwert>, der Maximalwert auf den die Endfarbnummer skaliert wird, Beispiel: 30. <Schrittweite>, für jeden Schritt wird ein Farbwert erzeugt, Beispiel: 0.5. Beispielangabe: #0000FF,#FF0000,7,30,0.5 ": -"Syntax: +"Wrong input:$value\nSyntax: <start color number>,<end color number>,<minimal value>,<maximal value>,<step width> <start color number>, a HTML color number, example: #0000FF for blue. -<end color number>, , a HTML color number, example: #FF0000 for red. +<end color number>, a HTML color number, example: #FF0000 for red. <minimal value>, the start color number will be scaled to it, example: 7. <maximal value>, the end color number will be scaled to it, example: 30. <step width>, for each step a color number will be generated, example: 0.5. @@ -1577,7 +1578,7 @@ DOIFtools contains tools to support DOIF.
  • create shortcuts
  • optionally create a menu entry
  • show a list of running wait timer
  • -
  • scale values to color numbers for coloration
  • +
  • scale values to color numbers and RGB values for coloration

  • Just one definition per FHEM-installation is allowed. More in the german section. @@ -1608,7 +1609,6 @@ DOIFtools stellt Funktionen zur Unterstützung von DOIF-Geräten bereit.
  • zeigt den Event Monitor in der Detailansicht von DOIFtools.
  • ermöglicht den Zugriff auf den Event Monitor in der Detailansicht von DOIF.
  • erzeugt DOIF-Operanden aus einer Event-Zeile des Event-Monitors.
  • -
  • skaliert Werte zu Farbnummern zum Einfärben, z.B. von Icons.

  • Inhalt