2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

11_OWDevice.pm: model attribute is only set or overwritten if model can be read from the bus.

git-svn-id: https://svn.fhem.de/fhem/trunk@7613 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2015-01-18 12:16:31 +00:00
parent fac79add0a
commit fe6b631dad

View File

@ -694,9 +694,13 @@ OWDevice_InitValues($)
{ {
my ($hash) = @_; my ($hash) = @_;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
my $model;
$hash->{fhem}{bus}= OWDevice_ReadFromServer($hash,"find",$hash->{fhem}{address}); $hash->{fhem}{bus}= OWDevice_ReadFromServer($hash,"find",$hash->{fhem}{address});
$attr{$name}{model}= OWDevice_ReadValue($hash, "type"); $model= OWDevice_ReadValue($hash, "type");
if(defined($model)) {
$attr{$name}{model}= $model if($model ne "");
}
if($hash->{fhem}{interfaces} eq "id" && !defined($hash->{fhem}{interval})) { if($hash->{fhem}{interfaces} eq "id" && !defined($hash->{fhem}{interval})) {
my $dir= OWDevice_ReadFromServer($hash,"dir","/"); my $dir= OWDevice_ReadFromServer($hash,"dir","/");