2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 16:59:18 +00:00

00_MQTT2_SERVER.pm: let lastPublish generate events (Forum #108630)

git-svn-id: https://svn.fhem.de/fhem/trunk@21257 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-02-23 12:33:31 +00:00
parent 02368bb195
commit 08f0d6d5c8
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ MQTT2_CLIENT_Initialize($)
username
);
use warnings 'qw';
$hash->{AttrList} = join(" ", @attrList);
$hash->{AttrList} = join(" ", @attrList)." ".$readingFnAttributes;
}
#####################################
@ -248,7 +248,7 @@ MQTT2_CLIENT_Set($@)
return "Usage: set $name publish -r topic [value]" if(@a < 1);
my $tp = shift(@a);
my $val = join(" ", @a);
readingsSingleUpdate($hash, "lastPublish", "$tp:$val", 0);
readingsSingleUpdate($hash, "lastPublish", "$tp:$val", 1);
MQTT2_CLIENT_doPublish($hash, $tp, $val, $retain);
} elsif($a[0] eq "password") {

View File

@ -162,7 +162,7 @@ MQTT2_SERVER_Set($@)
return "Usage: publish -r topic [value]" if(@a < 1);
my $tp = shift(@a);
my $val = join(" ", @a);
readingsSingleUpdate($hash, "lastPublish", "$tp:$val", 0);
readingsSingleUpdate($hash, "lastPublish", "$tp:$val", 1);
MQTT2_SERVER_doPublish($hash->{CL}, $hash, $tp, $val, $retain);
}
}