From 1f688078baf97e10a3821211d29e99ed98ff85a4 Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Sat, 12 May 2012 09:01:22 +0000 Subject: [PATCH] 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 --- fhem/FHEM/67_ECMDDevice.pm | 16 +++++++--------- fhem/docs/commandref.html | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/fhem/FHEM/67_ECMDDevice.pm b/fhem/FHEM/67_ECMDDevice.pm index e0537c125..b153c4fd4 100644 --- a/fhem/FHEM/67_ECMDDevice.pm +++ b/fhem/FHEM/67_ECMDDevice.pm @@ -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}; diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index d1fde7f9c..0ac76836c 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -5618,6 +5618,17 @@ Attributes:
+ + Attributes + +

+ + Example 1

- + Example 2

@@ -5682,6 +5693,8 @@ Attributes:
returns the string ok or the string error. + +