mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
fhem.pl: add the overrideNotifydev Attribute (Forum #134677)
git-svn-id: https://svn.fhem.de/fhem/trunk@27895 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
22b7601dc4
commit
368d6a724a
@ -418,6 +418,15 @@ Device specific attributes are documented in the corresponding device section.
|
||||
grouping attribute.
|
||||
</li><br>
|
||||
|
||||
<a name="overrideNotifydev"></a>
|
||||
<li>overrideNotifydev<br>
|
||||
if set (the argument is a devspec), the optimization for notifications
|
||||
is using this value instead of the module-set NOTIFYDEV internal.
|
||||
Use it only, if you know it better than the module maintainer.
|
||||
In order to be available, the global or the device userattr must be set
|
||||
first, to include it.
|
||||
</li><br>
|
||||
|
||||
<a name="room"></a>
|
||||
<li>room<br>
|
||||
Filter/group devices in frontends. A device can appear in more than one
|
||||
|
@ -416,6 +416,16 @@ Gerät dokumentiert.
|
||||
gesetzte Gerätetyp verwendet.
|
||||
</li><br>
|
||||
|
||||
<a name="overrideNotifydev"></a>
|
||||
<li>overrideNotifydev<br>
|
||||
falls gesetzt (das Argument ist ein devspec), dann verwendet die
|
||||
Optimierung der Benachrichtigungen diesen Wert, statt das vom Modul
|
||||
gesetzte Internal NOTIFYDEV. Man sollte es nur dann setzen, falls
|
||||
man es besser weiss, als der Modul Maintainer. Damit es setzbar ist,
|
||||
muss vorher das global oder Geräte spezifische userattr
|
||||
Attribut ergänzt werden.
|
||||
</li><br>
|
||||
|
||||
<a name="room"></a>
|
||||
<li>room<br>
|
||||
Filtert/gruppiert Geräte.
|
||||
|
@ -5630,7 +5630,8 @@ createNtfyHash()
|
||||
my %d2a_cache;
|
||||
%ntfyHash = ("*" => []);
|
||||
foreach my $d (@ntfyList) {
|
||||
my $ndl = $defs{$d}{NOTIFYDEV};
|
||||
my $ndl = $attr{$d}{overrideNotifydev};
|
||||
$ndl = $defs{$d}{NOTIFYDEV} if(!$ndl);
|
||||
next if(!$ndl);
|
||||
my @ndlarr;
|
||||
if($d2a_cache{$ndl}) {
|
||||
@ -5648,7 +5649,8 @@ createNtfyHash()
|
||||
|
||||
my @nhk = keys %ntfyHash;
|
||||
foreach my $d (@ntfyList) {
|
||||
my $ndl = $defs{$d}{NOTIFYDEV};
|
||||
my $ndl = $attr{$d}{overrideNotifydev};
|
||||
$ndl = $defs{$d}{NOTIFYDEV} if(!$ndl);
|
||||
my $arr = ($ndl ? $d2a_cache{$ndl} : \@nhk);
|
||||
map { push @{$ntfyHash{$_}}, $d } @{$arr};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user