fix attr webhookFwInstance

This commit is contained in:
Marko Oldenburg 2020-01-10 19:46:30 +01:00
parent a8040546b1
commit 835e1cbcfc

View File

@ -168,7 +168,7 @@ sub NUKIBridge_Initialize($) {
$hash->{MatchList} = { '1:NUKIDevice' => '^{.*}$' }; $hash->{MatchList} = { '1:NUKIDevice' => '^{.*}$' };
my $webhookFWinstance = my $webhookFWinstance =
join( ',', devspec2array('TYPE=FHEMWEB:FILTER=TEMPORARY!=1') ); join( ",", devspec2array('TYPE=FHEMWEB:FILTER=TEMPORARY!=1') );
# Consumer # Consumer
$hash->{SetFn} = 'NUKIBridge_Set'; $hash->{SetFn} = 'NUKIBridge_Set';
@ -536,7 +536,7 @@ sub NUKIBridge_firstRun($) {
} }
sub NUKIBridge_Write($@) { sub NUKIBridge_Write($@) {
my ( $hash, $path, $lockAction, $nukiId, $deviceType ) = @_; my ( $hash, $path, $obj, $nukiId, $deviceType ) = @_;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
my $host = $hash->{HOST}; my $host = $hash->{HOST};
@ -546,18 +546,18 @@ sub NUKIBridge_Write($@) {
my $uri = 'http://' . $hash->{HOST} . ':' . $port; my $uri = 'http://' . $hash->{HOST} . ':' . $port;
$uri .= '/' . $path if ( defined $path ); $uri .= '/' . $path if ( defined $path );
$uri .= '?token=' . $token if ( defined($token) ); $uri .= '?token=' . $token if ( defined($token) );
$uri .= '&action=' . $lockActionsSmartLock{$lockAction} $uri .= '&action=' . $lockActionsSmartLock{$obj}
if ( defined($lockAction) if ( defined($obj)
and $path ne 'callback/add' and $path ne 'callback/add'
and $deviceType == 0 ); and $deviceType == 0 );
$uri .= '&action=' . $lockActionsOpener{$lockAction} $uri .= '&action=' . $lockActionsOpener{$obj}
if ( defined($lockAction) if ( defined($obj)
and $path ne 'callback/add' and $path ne 'callback/add'
and $deviceType == 2 ); and $deviceType == 2 );
$uri .= '&url=' . $lockAction $uri .= '&url=' . $obj
if ( defined($lockAction) if ( defined($obj)
and $path eq 'callback/add' ); and $path eq 'callback/add' );
$uri .= '&nukiId=' . $nukiId $uri .= '&nukiId=' . $nukiId