2
0
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:
rudolfkoenig 2012-03-18 11:36:25 +00:00
parent 69d188a2dc
commit c7904cf514

View File

@ -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