2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 23:09:26 +00:00

added buslocation for ID devices without interval

git-svn-id: https://svn.fhem.de/fhem/trunk@2508 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mfr69bs 2013-01-13 18:58:27 +00:00
parent 1174405530
commit c93efd6f0a

View File

@ -634,9 +634,12 @@ OWDevice_Define($$)
my $value= OWDevice_Get($hash, "address");
my $dir= OWDevice_ReadFromServer($hash,"dir","/");
my $present= ($dir =~ m/$hash->{fhem}{address}/) ? 1 :0;
my $bus= OWDevice_ReadFromServer($hash,"find",$hash->{fhem}{address});
my $location= (defined($bus)) ? $bus :"absent";
readingsBeginUpdate($hash);
readingsBulkUpdate($hash,"present",$present);
readingsBulkUpdate($hash,"state","present: $present");
readingsBulkUpdate($hash,"location",$location);
readingsEndUpdate($hash,1);
}
OWDevice_UpdateValues($hash) if(defined($hash->{fhem}{interval}));