2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

10_MQTT2_DEVICE.pm: add Log output for set and get (Forum #108302)

git-svn-id: https://svn.fhem.de/fhem/trunk@21168 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-02-10 15:48:13 +00:00
parent 9c08936260
commit c16e1715aa

View File

@ -347,6 +347,7 @@ MQTT2_DEVICE_Get($@)
my ($gets,$cmdList) = MQTT2_getCmdHash(AttrVal($hash->{NAME}, "getList", ""));
return "Unknown argument $a[1], choose one of $cmdList" if(!$gets->{$a[1]});
return undef if(IsDisabled($hash->{NAME}));
Log3 $hash, 3, "MQTT2_DEVICE get ".join(" ", @a);
my ($getReading, $cmd) = split(" ",$gets->{$a[1]},2);
if($hash->{CL}) {
@ -380,6 +381,7 @@ MQTT2_DEVICE_Set($@)
return SetExtensions($hash, $cmdList, @a) if(!$cmd);
return undef if(IsDisabled($name));
Log3 $hash, 3, "MQTT2_DEVICE set ".join(" ", @a);
my $a1 = (@a > 1 ? $a[1] : '');
$cmd = MQTT2_buildCmd($hash, \@a, $cmd);
return if(!$cmd);