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

31_HUEDevice.pm: added json command for sensor devices

git-svn-id: https://svn.fhem.de/fhem/trunk@11901 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2016-08-05 20:17:07 +00:00
parent fdb9ce31ef
commit 10d6b2e561

View File

@ -604,8 +604,20 @@ HUEDevice_Set($@)
RemoveInternalTimer($hash);
HUEDevice_GetUpdate($hash);
return undef;
} elsif( $cmd eq 'json' ) {
my $shash = $defs{$name}->{IODev};
my $id = $hash->{ID};
$id = $1 if( $id =~ m/^S(\d.*)/ );
return HUEBridge_Set( $shash, $shash->{NAME}, 'setsensor', $id, @args );
return undef;
}
return "Unknown argument $cmd, choose one of json statusRequest:noArg" if( $hash->{type} && $hash->{type} =~ /^CLIP/ );
return "Unknown argument $cmd, choose one of statusRequest:noArg";
}