2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

set inactive for devList

git-svn-id: https://svn.fhem.de/fhem/trunk@2854 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-03-04 21:44:35 +00:00
parent 0ac65ec705
commit 6327a552fe

View File

@ -107,11 +107,12 @@ FBDECT_Get($@)
my @answ = FBAHA_getDevList($hash->{IODev}, $hash->{id});
return $answ[0] if(@answ == 1);
my $d = pop @answ;
my $state = "inactive" if($answ[0] =~ m/ inactive,/);
while($d) {
my ($ptyp, $plen, $pyld) = FBDECT_decodePayload($d);
if($ptyp eq "state" &&
ReadingsVal($hash->{NAME}, $ptyp, "") ne $pyld) {
readingsSingleUpdate($hash, $ptyp, $pyld, 1);
readingsSingleUpdate($hash, $ptyp, ($state ? $state : $pyld), 1);
}
push @answ, " $ptyp: $pyld";
$d = substr($d, 16+$plen*2);