mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
10_MQTT2_DEVICE.pm: add $name to GetFn (Forum #125744)
git-svn-id: https://svn.fhem.de/fhem/trunk@25564 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
26fc74ea30
commit
1bc14fb037
@ -361,10 +361,11 @@ MQTT2_DEVICE_Get($@)
|
||||
{
|
||||
my ($hash, @a) = @_;
|
||||
return "Not enough arguments for get" if(!defined($a[1]));
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
my ($gets,$cmdList) = MQTT2_getCmdHash(AttrVal($hash->{NAME}, "getList", ""));
|
||||
my ($gets,$cmdList) = MQTT2_getCmdHash(AttrVal($name, "getList", ""));
|
||||
return "Unknown argument $a[1], choose one of $cmdList" if(!$gets->{$a[1]});
|
||||
return undef if(IsDisabled($hash->{NAME}));
|
||||
return undef if(IsDisabled($name));
|
||||
Log3 $hash, 3, "MQTT2_DEVICE get ".join(" ", @a);
|
||||
|
||||
my ($getReading, $cmd) = split(" ",$gets->{$a[1]},2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user