2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

PRESENCE: fixing not working timer, when using set [...] statusRequest (additionally to r7184, thanks to Patrick)

git-svn-id: https://svn.fhem.de/fhem/trunk@7278 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2014-12-20 17:30:27 +00:00
parent 102e98adc1
commit 6c86a5ff39

View File

@ -552,6 +552,18 @@ sub PRESENCE_StartLocalScan($;$)
} }
else else
{ {
Log3 $hash->{NAME}, 4, "PRESENCE ($name) - another check is currently running. skipping check";
if($local == 0)
{
my $seconds = (ReadingsVal($name, "state", "absent") eq "present" ? $hash->{TIMEOUT_PRESENT} : $hash->{TIMEOUT_NORMAL});
Log3 $hash->{NAME}, 4, "PRESENCE ($name) - rescheduling next check in $seconds seconds";
RemoveInternalTimer($hash);
InternalTimer(gettimeofday()+$seconds, "PRESENCE_StartLocalScan", $hash, 0) unless($hash->{helper}{DISABLED});
}
return "another check is currently running"; return "another check is currently running";
} }
} }