deleting cachednr on fritzbox mode if no device number can be found
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2815 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -511,7 +511,7 @@ PRESENCE_DoLocalFritzBoxScan($)
|
||||
|
||||
chomp $status;
|
||||
|
||||
return ($status == 0 ? "$name|$local|absent|$number" : "$name|$local|present|$number");
|
||||
return ($status == 0 ? "$name|$local|absent" : "$name|$local|present").($number <= $max ? "|$number" : "");
|
||||
}
|
||||
|
||||
sub
|
||||
@@ -589,6 +589,10 @@ PRESENCE_ProcessLocalScan($)
|
||||
{
|
||||
$hash->{helper}{cachednr} = $a[3] if(($a[2] eq "present") || ($a[2] eq "absent"));
|
||||
}
|
||||
elsif($hash->{MODE} eq "fritzbox" and defined($hash->{helper}{cachednr}))
|
||||
{
|
||||
delete($hash->{helper}{cachednr});
|
||||
}
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
if($a[2] eq "present")
|
||||
|
||||
Reference in New Issue
Block a user