Update Nuki Bridge version and fix callback handling
Improved the Nuki Bridge module by updating the version to v2.1.1, indicating a minor enhancement likely related to internal changes or bug fixes. Additionally, in the `Set` and `Get` methods, updated the return conditions to exclude the endpoint from the results when it matches the output from the command handlers. This change ensures that the endpoint is not returned as part of the command responses, which could lead to confusion and unintended behavior for users interacting with the API. These modifications enhance the clarity and reliability of the responses provided by the Nuki Bridge API.
This commit is contained in:
@@ -267,7 +267,7 @@ sub Initialize {
|
||||
],
|
||||
"release_status": "stable",
|
||||
"license": "GPL_2",
|
||||
"version": "v2.1.0",
|
||||
"version": "v2.1.1",
|
||||
"x_apiversion": "1.13.0",
|
||||
"author": [
|
||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
UPD 2025-10-14_11:00:54 10358 FHEM/73_NUKIBridge.pm
|
||||
UPD 2025-10-15_06:53:37 11100 FHEM/74_NUKIDevice.pm
|
||||
UPD 2025-10-14_11:00:54 42820 lib/FHEM/Devices/Nuki/Bridge.pm
|
||||
UPD 2025-10-15_06:43:51 16775 lib/FHEM/Devices/Nuki/Device.pm
|
||||
UPD 2025-10-16_18:36:43 10358 FHEM/73_NUKIBridge.pm
|
||||
UPD 2025-10-15_06:55:14 11100 FHEM/74_NUKIDevice.pm
|
||||
UPD 2025-10-16_18:34:25 42928 lib/FHEM/Devices/Nuki/Bridge.pm
|
||||
UPD 2025-10-15_06:55:14 16775 lib/FHEM/Devices/Nuki/Device.pm
|
||||
|
@@ -454,21 +454,24 @@ sub Set {
|
||||
return 'usage: callbackRemove'
|
||||
if ( split( m{\s+}xms, $arg ) > 1 );
|
||||
my $id = defined $arg ? $arg : 0;
|
||||
$endpoint = 'callback/remove';
|
||||
$param = '{"param":"' . $id . '"}';
|
||||
$endpoint = 'callback/remove';
|
||||
},
|
||||
configauth => sub {
|
||||
return 'usage: configAuth'
|
||||
if ( split( m{\s+}xms, $arg ) > 1 );
|
||||
my $configAuth = 'enable=' . ( $arg eq 'enable' ? 1 : 0 );
|
||||
$endpoint = 'configAuth';
|
||||
$param = '{"param":"' . $configAuth . '"}';
|
||||
$endpoint = 'configAuth';
|
||||
},
|
||||
);
|
||||
|
||||
if ( exists $handlers{$cmd} ) {
|
||||
my $result = $handlers{$cmd}->();
|
||||
return $result if defined $result && length $result;
|
||||
return $result
|
||||
if defined $result
|
||||
&& length $result
|
||||
&& $result ne $endpoint;
|
||||
}
|
||||
else {
|
||||
my $list = 'info:noArg getDeviceList:noArg ';
|
||||
@@ -507,7 +510,10 @@ sub Get {
|
||||
|
||||
if ( exists $handlers{$cmd} ) {
|
||||
my $result = $handlers{$cmd}->();
|
||||
return $result if defined $result && length $result;
|
||||
return $result
|
||||
if defined $result
|
||||
&& length $result
|
||||
&& $result ne $endpoint;
|
||||
}
|
||||
else {
|
||||
my $list = 'callbackList:noArg ';
|
||||
|
Reference in New Issue
Block a user