From 349ba5d67fa86b7c86dcffc20efb0d6945aa13ac Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Wed, 9 Apr 2014 16:12:49 +0000 Subject: [PATCH] fhem.pl: userreading name may contain - git-svn-id: https://svn.fhem.de/fhem/trunk@5498 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/docs/commandref_frame.html | 58 ++++++++++++++++-------------- fhem/docs/commandref_frame_DE.html | 10 ++++-- fhem/fhem.pl | 2 +- 3 files changed, 40 insertions(+), 30 deletions(-) diff --git a/fhem/docs/commandref_frame.html b/fhem/docs/commandref_frame.html index 8758fc069..dd5e9d8b1 100644 --- a/fhem/docs/commandref_frame.html +++ b/fhem/docs/commandref_frame.html @@ -469,32 +469,38 @@ A line ending with \ will be concatenated with the next one, so long lines energy1:counters.A { ReadingsVal("myMultiMeter","counters.A",0)/1250.0;; }, energy2:counters.B { ReadingsVal("myMultiMeter","counters.B",0)/1250.0;; } - <modifier> can take one of these values: - - Example:
- - Note: user readings with modifiers difference and differential store the - calculated values internally. The user reading is set earliest at the - second evaluation. Beware of stale values when changing definitions! + <modifier> can take one of these values: + + Example:
+ + Notes: +

diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html index 658828881..bc156b6a6 100644 --- a/fhem/docs/commandref_frame_DE.html +++ b/fhem/docs/commandref_frame_DE.html @@ -508,9 +508,13 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.

attr myPowerMeter userReadings power differential { ReadingsVal("myPowerMeter","counters.A",0)/1250.0} - Achtung: Falls difference oder differential spezifiziert ist, dann werden - für die Berechnung ältere Werte benötigt, d.h. der Wert wird - frühestens beim zweiten Änderung gesetzt. + Achtung:
diff --git a/fhem/fhem.pl b/fhem/fhem.pl index f20e53d4e..8d23e6cd6 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -2166,7 +2166,7 @@ CommandAttr($$) my $arg= $a[2]; # matches myReading1[:trigger2] { codecode1 } - my $regexi= '\s*(\w+)(:\S*)?\s+((\w+)\s+)?({.*?})\s*'; + my $regexi= '\s*([\w-]+)(:\S*)?\s+((\w+)\s+)?({.*?})\s*'; my $regexo= '^(' . $regexi . ')(,\s*(.*))*$'; #Log 1, "arg is $arg";