mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
ECMDDevice: commands set and get set states no matter if there is a value for set or get given
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5645 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
35d776617c
commit
db7d993b46
@ -109,24 +109,20 @@ ECMDDevice_Changed($$$)
|
|||||||
{
|
{
|
||||||
my ($hash, $cmd, $value)= @_;
|
my ($hash, $cmd, $value)= @_;
|
||||||
|
|
||||||
if(defined($value) && $value ne "") {
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
readingsBulkUpdate($hash, $cmd, $value);
|
|
||||||
|
|
||||||
my $state= $cmd;
|
my $state= $cmd;
|
||||||
|
|
||||||
|
if(defined($value) && $value ne "") {
|
||||||
|
readingsBulkUpdate($hash, $cmd, $value);
|
||||||
$state.= " $value";
|
$state.= " $value";
|
||||||
|
}
|
||||||
readingsBulkUpdate($hash, "state", $state);
|
readingsBulkUpdate($hash, "state", $state);
|
||||||
|
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
|
|
||||||
my $name= $hash->{NAME};
|
my $name= $hash->{NAME};
|
||||||
Log3 $hash, 4 , "ECMDDevice $name $state";
|
Log3 $hash, 4 , "ECMDDevice $name $state";
|
||||||
|
|
||||||
return $state;
|
return $state;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
sub
|
sub
|
||||||
ECMDDevice_PostProc($$$)
|
ECMDDevice_PostProc($$$)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user