mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 09:55:38 +00:00
00_MQTT2_SERVER: make the code more robust and shorter
git-svn-id: https://svn.fhem.de/fhem/trunk@26886 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f5ea2bc0c2
commit
8ac53eed13
@ -236,8 +236,8 @@ MQTT2_SERVER_Set($@)
|
||||
MQTT2_SERVER_doPublish($hash->{CL}, $hash, $tp, $val, $retain);
|
||||
|
||||
} elsif($a[0] eq "clearRetain") {
|
||||
my $rname = AttrVal($hash->{NAME}, "hideRetain", 0) ? ".RETAIN" : "RETAIN";
|
||||
delete($hash->{READINGS}{$rname});
|
||||
delete($hash->{READINGS}{RETAIN});
|
||||
delete($hash->{READINGS}{".RETAIN"});
|
||||
delete($hash->{retain});
|
||||
return undef;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user