mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fhem.pl: multi-device NOTIFYDEV patch from Markus (Forum #47119)
git-svn-id: https://svn.fhem.de/fhem/trunk@10433 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b1ceb42fb8
commit
c14834723c
18
fhem/fhem.pl
18
fhem/fhem.pl
@ -4316,18 +4316,20 @@ createNtfyHash()
|
||||
my @ntfyList = sort { $defs{$a}{NTFY_ORDER} cmp $defs{$b}{NTFY_ORDER} }
|
||||
grep { $defs{$_}{NTFY_ORDER} } keys %defs;
|
||||
foreach my $d (@ntfyList) {
|
||||
my $nd = $defs{$d}{NOTIFYDEV};
|
||||
#Log 1, "Created notify class for $nd / $d" if($nd);
|
||||
$ntfyHash{$nd} = [] if($nd && !defined($ntfyHash{$nd}));
|
||||
if($defs{$d}{NOTIFYDEV}) {
|
||||
foreach my $nd (split(",",$defs{$d}{NOTIFYDEV})) {
|
||||
$ntfyHash{$nd} = [] if($nd && !defined($ntfyHash{$nd}));
|
||||
}
|
||||
}
|
||||
}
|
||||
$ntfyHash{"*"} = [];
|
||||
foreach my $d (@ntfyList) {
|
||||
my $nd = $defs{$d}{NOTIFYDEV};
|
||||
if($nd) {
|
||||
push @{$ntfyHash{$nd}}, $d;
|
||||
|
||||
if($defs{$d}{NOTIFYDEV}) {
|
||||
foreach my $nd (split(",",$defs{$d}{NOTIFYDEV})) {
|
||||
push @{$ntfyHash{$nd}}, $d;
|
||||
}
|
||||
} else {
|
||||
foreach $nd (keys %ntfyHash) {
|
||||
foreach my $nd (keys %ntfyHash) {
|
||||
push @{$ntfyHash{$nd}}, $d;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user