diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index a402c06..b4351ba 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -899,9 +899,9 @@ sub PollChild { if ( defined( $hash->{".fhem"}{subprocess} ) ) { my $subprocess = $hash->{".fhem"}{subprocess}; - my $response = $subprocess->readFromChild(); + my @response = $subprocess->readFromChild(); - if ( !defined($response) ) { + if ( !defined(@response) ) { Log3( $name, 5, qq{GardenaSmartBridge ($name) - still waiting ($subprocess->{lasterror}).} ); @@ -923,8 +923,8 @@ qq{GardenaSmartBridge ($name) - got result from asynchronous parsing} CleanSubprocess($hash); - if ( ref($response) eq 'ARRAY' ) { - for my $json ( @{$response} ) { + if ( scalar(@response) > 0 ) { + for my $json (@response) { ################# $decode_json = eval { decode_json($json) }; @@ -968,7 +968,7 @@ sub ResponseSubprocessing { ( $json, $tail ) = ParseJSON($tail); } - $subprocess->writeToParent( \@response ); + $subprocess->writeToParent(@response); return; } diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 03b8b81..54905ea 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2022-02-01_10:58:50 49892 FHEM/73_GardenaSmartBridge.pm +UPD 2022-02-01_11:52:56 49880 FHEM/73_GardenaSmartBridge.pm UPD 2022-01-31_19:35:42 56993 FHEM/74_GardenaSmartDevice.pm