2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

MQTT_DEVICE: cosmetics

git-svn-id: https://svn.fhem.de/fhem/trunk@6774 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess 2014-10-17 05:20:34 +00:00
parent e3d6d721ef
commit 6c8a33dc87

View File

@ -83,9 +83,9 @@ sub Set($$$@) {
return "Need at least one parameters" unless defined $command;
return "Unknown argument $command, choose one of " . join(" ", map {$hash->{sets}->{$_} eq "" ? $_ : "$_:".$hash->{sets}->{$_}} sort keys %{$hash->{sets}})
if(!defined($hash->{sets}->{$command}));
my $value = join " ",@values;
my $msgid;
if (defined $value) {
if (@values) {
my $value = join " ",@values;
$msgid = send_publish($hash->{IODev}, topic => $hash->{publishSets}->{$command}->{topic}, message => $value, qos => $hash->{qos}, retain => $hash->{retain});
readingsSingleUpdate($hash,$command,$value,1);
} else {