new attribute userReadings

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2505 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert
2013-01-13 15:16:31 +00:00
parent 84721a1fd0
commit 9558b53f15
3 changed files with 87 additions and 11 deletions

View File

@@ -380,7 +380,21 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p>
<li>Wenn ein "reading" in event-on-update-reading aufgef&uuml;hrt ist,
erzeugt eine Aktualisierung ein Ereignis unabh&auml;ngig ob das
"reading" auch in event-on-change-reading aufgelistet ist.</li>
</ul>
</ul><br>
<a name="userReadings"></a>
<li>userReadings<br>
A comma-separated list of user-defined readings. Each definition has the form
<code>&lt;reading&gt; { &lt;perl code&gt; }</code>. After a single or bulk
readings update, the user-defined readings are set by evaluating the <a href="#perl">
perl code</a>
<code>{ &lt;perl code&gt; }</code> for all definitions and setting the value of
the respective user-defined reading <code>&lt;reading&gt;</code> to the result.<br><br>
Examples:<br>
<code>attr myPowerMeter userReadings power { ReadingsVal("myPowerMeter","count.A",0)/1250.0;; }</code><br>
<code>attr myMultiMeter userReadings power1 { ReadingsVal("myMultiMeter","count.A",0)/1250.0;; },
power2 { ReadingsVal("myMultiMeter","count.B",0)/1250.0;; }</code>
</li><br>
</ul>
<br>