fheminfo: internal model information has highest priority

git-svn-id: https://svn.fhem.de/fhem/trunk@16523 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen
2018-03-30 17:16:35 +00:00
parent a4b208c77d
commit 750da98f35

View File

@@ -100,23 +100,25 @@ sub _fi2_Count() {
$model = defined($defs{$key}{MODEL}) ? $defs{$key}{MODEL} : $model;
}
if ($model eq $c_noModel) {
# 3. look for model information in attributes
$model = AttrVal($name,'model',$model);
$model = AttrVal($name,'model',$model);
# 4. look for model information in readings
$model = ReadingsVal($name,'model',$model);
$model = ReadingsVal($name,'model',$model);
# special reading for BOSEST
$model = ReadingsVal($name,'type',$model)
if (lc($type) eq 'bosest');
# special reading for ZWave
if (lc($type) eq 'zwave') {
$model = ReadingsVal($name,'modelId',undef);
next unless (defined($model));
next if ($model =~ /^0x.... /);
$model = _fi2_zwave($model);
# special reading for BOSEST
$model = ReadingsVal($name,'type',$model)
if (lc($type) eq 'bosest');
# special reading for ZWave
if (lc($type) eq 'zwave') {
$model = ReadingsVal($name,'modelId',undef);
next unless (defined($model));
next if ($model =~ /^0x.... /);
$model = _fi2_zwave($model);
}
}
# 5. ignore model for some modules
foreach my $i (@noModelList) {
$model = $c_noModel if (lc($type) eq $i);