mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
eventMap state bugfix (PlusPus & Plus)
git-svn-id: https://svn.fhem.de/fhem/trunk@1578 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d282361ab1
commit
203df9f54c
10
fhem/fhem.pl
10
fhem/fhem.pl
@ -2618,18 +2618,18 @@ ReplaceEventMap($$$)
|
|||||||
my $nstr = join(" ", @{$str}) if(!$dir);
|
my $nstr = join(" ", @{$str}) if(!$dir);
|
||||||
my $changed;
|
my $changed;
|
||||||
foreach my $rv (split($sc, $em)) {
|
foreach my $rv (split($sc, $em)) {
|
||||||
my ($re, $val) = split(":", $rv, 2);
|
my ($re, $val) = split(":", $rv, 2); # Real-Event-Regexp:GivenName
|
||||||
next if(!defined($val));
|
next if(!defined($val));
|
||||||
if($dir) { # event -> Presentation
|
if($dir) { # event -> GivenName
|
||||||
if($str =~ m/$re/) {
|
if($str =~ m/$re/) {
|
||||||
$str =~ s/$re/$val/;
|
$str =~ s/$re/$val/;
|
||||||
$changed = 1;
|
$changed = 1;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { # Setting event
|
} else { # GivenName -> set command
|
||||||
if($nstr =~ m/$val/) {
|
if($nstr =~ m/\b$val\b/) {
|
||||||
$nstr =~ s/$val/$re/;
|
$nstr =~ s/\b$val\b/$re/;
|
||||||
$changed = 1;
|
$changed = 1;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user