2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

colon removed from ECMDDevice state and migrated to readingsUpdate API

git-svn-id: https://svn.fhem.de/fhem/trunk@1556 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2012-05-12 09:01:22 +00:00
parent cd2a10044b
commit 1f688078ba
2 changed files with 21 additions and 10 deletions

View File

@ -79,16 +79,14 @@ ECMDDevice_Changed($$$)
{
my ($hash, $cmd, $value)= @_;
readingsBeginUpdate($hash);
readingsUpdate($hash, $cmd, $value);
readingsEndUpdate($hash, 1);
$hash->{STATE} = "$cmd $value";
my $name= $hash->{NAME};
$hash->{READINGS}{$cmd}{TIME} = TimeNow();
$hash->{READINGS}{$cmd}{VAL} = $value;
$hash->{CHANGED}[0]= "$cmd: $value";
DoTrigger($name, undef) if($init_done);
$hash->{STATE} = "$cmd: $value";
Log GetLogLevel($name, 4), "ECMDDevice $name $cmd: $value";
return $hash->{STATE};

View File

@ -5618,6 +5618,17 @@ Attributes:<br>
</ul>
<a name="ECMDDeviceattr"></a>
<b>Attributes</b>
<ul>
<li><a href="#loglevel">loglevel</a></li>
<li><a href="#eventMap">eventMap</a></li>
<li><a href="#event-on-update-reading">event-on-update-reading</a></li>
<li><a href="#event-on-change-reading">event-on-change-reading</a></li>
</ul>
<br><br>
<b>Example 1</b>
<br><br>
<ul>
@ -5648,7 +5659,7 @@ Attributes:<br>
<br><br>
</ul>
</ul>
<b>Example 2</b>
<br><br>
@ -5682,6 +5693,8 @@ Attributes:<br>
returns the string <code>ok</code> or the string <code>error</code>.
</ul>
</ul>