mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 06:48:43 +00:00
67_ECMDDevice.pm: silence some warnings for undefined variables
git-svn-id: https://svn.fhem.de/fhem/trunk@7698 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c7a70e6fa1
commit
a3ae14782f
@ -109,10 +109,11 @@ ECMDDevice_ReplaceSpecials($%)
|
||||
{
|
||||
my ($s, %specials)= @_;
|
||||
|
||||
return $s unless(defined($s));
|
||||
# perform macro substitution
|
||||
foreach my $special (keys %specials) {
|
||||
$s =~ s/$special/$specials{$special}/g;
|
||||
}
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
@ -386,7 +387,7 @@ ECMDDevice_Parse($$)
|
||||
# we run over all readings in that classdef
|
||||
foreach my $r (keys %{$classDef->{readings}}) {
|
||||
my $regex= ECMDDevice_GetCachedReadingsMatch($hash, $classDef, $r);
|
||||
#Debug " Trying to match reading $r with regular expressing \"$regex\".";
|
||||
#Debug " Trying to match reading $r with regular expression \"$regex\" (device $d, classdef $classname, reading $r).";
|
||||
if($msg =~ m/^$regex$/) {
|
||||
# we found a match
|
||||
Log3 $IOhash, 5, "$name: match regex $regex for reading $r of device $d with class $classname";
|
||||
@ -394,7 +395,7 @@ ECMDDevice_Parse($$)
|
||||
push @matches, $d;
|
||||
my $command= ECMDDevice_GetCachedReadingsCommand($hash, $classDef, $r);
|
||||
my $value= ECMDDevice_EvalCommand($hash, $command, $msg);
|
||||
Log3 $hash, 5, "postprocessed value is $value";
|
||||
#Log3 $hash, 5, "postprocessed value is $value";
|
||||
ECMDDevice_Changed($hash, $r, $value);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user