2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 12:46:03 +00:00

fhem.pl: NOTIFYDEV uses devspec2array (Forum #59300 / #59274)

git-svn-id: https://svn.fhem.de/fhem/trunk@12386 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-10-20 08:01:00 +00:00
parent d26e692621
commit 47f7c1899e

View File

@ -4385,7 +4385,7 @@ createNtfyHash()
grep { $defs{$_}{NTFY_ORDER} } keys %defs;
foreach my $d (@ntfyList) {
if($defs{$d}{NOTIFYDEV}) {
foreach my $nd (split(",",$defs{$d}{NOTIFYDEV})) {
foreach my $nd (devspec2array($defs{$d}{NOTIFYDEV})) {
$ntfyHash{$nd} = [] if($nd && !defined($ntfyHash{$nd}));
}
}
@ -4393,7 +4393,7 @@ createNtfyHash()
$ntfyHash{"*"} = [];
foreach my $d (@ntfyList) {
if($defs{$d}{NOTIFYDEV}) {
foreach my $nd (split(",",$defs{$d}{NOTIFYDEV})) {
foreach my $nd (devspec2array($defs{$d}{NOTIFYDEV})) {
my $arr = $ntfyHash{$nd};
push @{$arr}, $d if(!grep /^$d$/, @{$arr});
}