From 14ce7e80a510c7e11a09b9ca17226f464fe60afd Mon Sep 17 00:00:00 2001 From: mfr69bs <> Date: Sun, 13 Jan 2013 18:58:27 +0000 Subject: [PATCH] added buslocation for ID devices without interval git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2508 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/11_OWDevice.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FHEM/11_OWDevice.pm b/FHEM/11_OWDevice.pm index e546bb59b..b258e1965 100644 --- a/FHEM/11_OWDevice.pm +++ b/FHEM/11_OWDevice.pm @@ -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}));