mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 00:48:53 +00:00
31_HUEDevice.pm: SetExtensionsCancel fix
git-svn-id: https://svn.fhem.de/fhem/trunk@12097 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
011ce88b88
commit
383a692228
@ -646,7 +646,10 @@ HUEDevice_Set($@)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SetExtensions($hash, $list, $name, @aa);
|
$hash->{InSetExtensions} = 1;
|
||||||
|
my $ret = SetExtensions($hash, $list, $name, @aa);
|
||||||
|
delete $hash->{InSetExtensions};
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $cmd eq 'rename' ) {
|
if( $cmd eq 'rename' ) {
|
||||||
@ -716,7 +719,7 @@ HUEDevice_Set($@)
|
|||||||
$result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/state",\%obj);
|
$result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/state",\%obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetExtensionsCancel($hash);
|
SetExtensionsCancel($hash) if( !$hash->{InSetExtensions} );
|
||||||
|
|
||||||
if( defined($result) && $result->{'error'} ) {
|
if( defined($result) && $result->{'error'} ) {
|
||||||
$hash->{STATE} = $result->{'error'}->{'description'};
|
$hash->{STATE} = $result->{'error'}->{'description'};
|
||||||
@ -755,7 +758,11 @@ HUEDevice_Set($@)
|
|||||||
$list .= " savescene deletescene scene" if( $hash->{helper}->{devtype} eq 'G' );
|
$list .= " savescene deletescene scene" if( $hash->{helper}->{devtype} eq 'G' );
|
||||||
$list .= " rename";
|
$list .= " rename";
|
||||||
|
|
||||||
return SetExtensions($hash, $list, $name, @aa);
|
$hash->{InSetExtensions} = 1;
|
||||||
|
my $ret = SetExtensions($hash, $list, $name, @aa);
|
||||||
|
delete $hash->{InSetExtensions};
|
||||||
|
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user