mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
Evenemap bugfix: dont replace the device name
git-svn-id: https://svn.fhem.de/fhem/trunk@1356 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
69d188a2dc
commit
c7904cf514
12
fhem/fhem.pl
12
fhem/fhem.pl
@ -2564,6 +2564,7 @@ ReplaceEventMap($$$)
|
||||
my ($dev, $str, $dir) = @_;
|
||||
my $em = $attr{$dev}{eventMap};
|
||||
return $str if(!$em);
|
||||
my $dname = shift @{$str} if(!$dir);
|
||||
|
||||
my $sc = " "; # Split character
|
||||
my $fc = substr($em, 0, 1); # First character of the eventMap
|
||||
@ -2594,8 +2595,15 @@ ReplaceEventMap($$$)
|
||||
}
|
||||
}
|
||||
return $str if($dir);
|
||||
return split(" ",$nstr) if($changed);
|
||||
return @{$str};
|
||||
|
||||
if($changed) {
|
||||
my @arr = split(" ",$nstr);
|
||||
push @arr, $dname;
|
||||
return @arr;
|
||||
} else {
|
||||
unshift @{$str}, $dname;
|
||||
return @{$str};
|
||||
}
|
||||
}
|
||||
|
||||
sub
|
||||
|
Loading…
x
Reference in New Issue
Block a user