mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
fixing dead PRESENCE devices in case of a broken network connection when disabled
git-svn-id: https://svn.fhem.de/fhem/trunk@2720 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dbf3566a20
commit
c511c5a8ff
@ -196,9 +196,16 @@ PRESENCE_Attr(@)
|
||||
if($a[3] eq "0")
|
||||
{
|
||||
$hash->{helper}{DISABLED} = 0;
|
||||
if(defined($hash->{FD}))
|
||||
if(defined($hash->{DeviceName}))
|
||||
{
|
||||
PRESENCE_DoInit($hash);
|
||||
if(defined($hash->{FD}))
|
||||
{
|
||||
PRESENCE_DoInit($hash);
|
||||
}
|
||||
else
|
||||
{
|
||||
DevIo_OpenDev($hash, 0, "PRESENCE_DoInit");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -223,9 +230,16 @@ PRESENCE_Attr(@)
|
||||
elsif($a[0] eq "del" && $a[2] eq "disable")
|
||||
{
|
||||
$hash->{helper}{DISABLED} = 0;
|
||||
if(defined($hash->{FD}))
|
||||
if(defined($hash->{DeviceName}))
|
||||
{
|
||||
PRESENCE_DoInit($hash);
|
||||
if(defined($hash->{FD}))
|
||||
{
|
||||
PRESENCE_DoInit($hash);
|
||||
}
|
||||
else
|
||||
{
|
||||
DevIo_OpenDev($hash, 0, "PRESENCE_DoInit");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user