mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 11:27:08 +00:00
10_MQTT2_DEVICE.pm: fix typo
git-svn-id: https://svn.fhem.de/fhem/trunk@20071 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f741b4f810
commit
673bc2c0f2
@ -391,7 +391,6 @@ MQTT2_DEVICE_Attr($$)
|
|||||||
|
|
||||||
if($attrName =~ m/(.*)List/) {
|
if($attrName =~ m/(.*)List/) {
|
||||||
my $atype = $1;
|
my $atype = $1;
|
||||||
|
|
||||||
if($type eq "del") {
|
if($type eq "del") {
|
||||||
MQTT2_DEVICE_delReading($dev) if($atype eq "reading");
|
MQTT2_DEVICE_delReading($dev) if($atype eq "reading");
|
||||||
return undef;
|
return undef;
|
||||||
@ -503,7 +502,7 @@ MQTT2_DEVICE_addReading($$)
|
|||||||
MQTT2_DEVICE_delReading($name);
|
MQTT2_DEVICE_delReading($name);
|
||||||
foreach my $line (split("\n", $param)) {
|
foreach my $line (split("\n", $param)) {
|
||||||
my ($re,$code) = split(" ", $line,2);
|
my ($re,$code) = split(" ", $line,2);
|
||||||
return "Bad line >$line< for $name" if(!defined($re) || !$defined($code);
|
return "Bad line >$line< for $name" if(!defined($re) || !defined($code));
|
||||||
eval { "Hallo" =~ m/^$re$/ };
|
eval { "Hallo" =~ m/^$re$/ };
|
||||||
return "Bad regexp: $@" if($@);
|
return "Bad regexp: $@" if($@);
|
||||||
$modules{MQTT2_DEVICE}{defptr}{re}{$re}{"$name,$code"} = $code;
|
$modules{MQTT2_DEVICE}{defptr}{re}{$re}{"$name,$code"} = $code;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user