2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

10_MQTT2_DEVICE.pm: avoid warning if there is no clientId (Forum #90145)

git-svn-id: https://svn.fhem.de/fhem/trunk@20816 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-12-23 08:57:46 +00:00
parent f791271348
commit 980e2d62a8

View File

@ -516,6 +516,7 @@ MQTT2_DEVICE_delReading($)
{ {
my ($name) = @_; my ($name) = @_;
my $cid = $defs{$name}{CID}; my $cid = $defs{$name}{CID};
$cid = "" if(!defined($cid));
for my $step (1,2) { for my $step (1,2) {
next if($step == 1 && !$modules{MQTT2_DEVICE}{defptr}{"re:$cid"}); next if($step == 1 && !$modules{MQTT2_DEVICE}{defptr}{"re:$cid"});
my $dp = $modules{MQTT2_DEVICE}{defptr}{$step==1 ? "re:$cid" : "re"}; my $dp = $modules{MQTT2_DEVICE}{defptr}{$step==1 ? "re:$cid" : "re"};