mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-17 17:36:01 +00:00
00_HMUARTLGW.pm: use "state"-reading instead of $hash->{STATE}
git-svn-id: https://svn.fhem.de/fhem/trunk@13312 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
797052bdec
commit
c8dc84ec8d
@ -316,10 +316,11 @@ sub HMUARTLGW_Ready($)
|
||||
{
|
||||
my ($hash) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
my $state = ReadingsVal($name, "state", "unknown");
|
||||
|
||||
Log3($hash, 4, "HMUARTLGW ${name} ready: ".$hash->{STATE});
|
||||
Log3($hash, 4, "HMUARTLGW ${name} ready: ${state}");
|
||||
|
||||
if ((!$hash->{lgwHash}) && $hash->{STATE} eq "disconnected") {
|
||||
if ((!$hash->{lgwHash}) && $state eq "disconnected") {
|
||||
#don't immediately reconnect when we just connected, delay
|
||||
#for 5s because remote closed the connection on us
|
||||
if (defined($hash->{LastOpen}) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user