mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
autocreate: ignoreTypes adds ^$ starting with featurelevel 5.9 (Forum #80775)
git-svn-id: https://svn.fhem.de/fhem/trunk@15620 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
adcaa0e49b
commit
d80b7e8c8a
@ -132,6 +132,8 @@ autocreate_Notify($$)
|
||||
next if(AttrVal($me, "disable", undef));
|
||||
|
||||
my $it = AttrVal($me, "ignoreTypes", undef);
|
||||
$it = "^$it\$" if($featurelevel > 5.8); # Forum #80775
|
||||
|
||||
next if($it && $name =~ m/$it/i);
|
||||
|
||||
my $at = AttrVal($me, "autocreateThreshold", undef);
|
||||
@ -751,9 +753,12 @@ autocreate_Attr(@)
|
||||
<li>ignoreTypes<br>
|
||||
This is a regexp, to ignore certain devices, e.g. the neighbours FHT.
|
||||
You can specify more than one, with usual regexp syntax, e.g.<br>
|
||||
attr autocreate ignoreTypes CUL_HOERMANN.*|FHT_1234|CUL_WS_7<br>
|
||||
attr autocreate ignoreTypes (CUL_HOERMANN.*|FHT_1234|CUL_WS_7)<br>
|
||||
The word "Types" is somehow misleading, as it actually checks the
|
||||
generated device name.
|
||||
generated device name.<br>
|
||||
<b>Note</b>: starting with featurelevel 5.9 the regexp is automatically
|
||||
extended with ^ and $, so that it must match the whole name (same
|
||||
procedure as in notify and FileLog).
|
||||
</li><br>
|
||||
|
||||
<a name="autocreateThreshold"></a>
|
||||
@ -915,9 +920,12 @@ autocreate_Attr(@)
|
||||
Funk-Heizungsthermostat (FHT) des Nachbarn. In dem Ausdruck können
|
||||
mehr als ein Gerät über die normale Regexp-Syntax angegeben
|
||||
werden. Beispiel:<br>
|
||||
attr autocreate ignoreTypes CUL_HOERMANN.*|FHT_1234|CUL_WS_7<br>
|
||||
attr autocreate ignoreTypes (CUL_HOERMANN.*|FHT_1234|CUL_WS_7)<br>
|
||||
Das Wort "Types" ist etwas irreführend, da der Gerätename
|
||||
geprüft wird, und nicht der Typ.
|
||||
geprüft wird, und nicht der Typ.<br>
|
||||
<b>Achtung</b>: ab featurelevel 5.9 wird der Regexp automatisch mit
|
||||
^ und $ ergänzt, muss also den kompletten Namen matchen (genau wie
|
||||
bei notify und FileLog).
|
||||
</li><br>
|
||||
|
||||
<a name="autocreateThreshold"></a>
|
||||
|
@ -2647,7 +2647,7 @@ GlobalAttr($$$$)
|
||||
|
||||
}
|
||||
elsif($name eq "featurelevel") {
|
||||
return "$val is not in the form N.N" if($val !~ m/^\d\.\d$/);
|
||||
return "$val is not in the form N.N" if($val !~ m/^\d+\.\d+$/);
|
||||
$featurelevel = $val;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user