2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

00_MQTT2_CLIENT.pm: add noArg to the connect/disconnect usage (Forum #114166)

git-svn-id: https://svn.fhem.de/fhem/trunk@22906 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-10-04 06:51:24 +00:00
parent 3bd56c9afe
commit 1b1abbf7d7

View File

@ -323,7 +323,8 @@ MQTT2_CLIENT_Set($@)
my $name = $hash->{NAME};
shift(@a);
return "Unknown argument ?, choose one of ".join(" ", keys %sets)
return "Unknown argument ?, choose one of ".
join(" ", map { $sets{$_} ? $_ : "$_:noArg" } keys %sets)
if(!$a[0] || !defined($sets{$a[0]}));
if($a[0] eq "publish") {