mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
31_HUEDevice.pm, 33_readingsProxy.pm: SetExtensionsCancel simplification
git-svn-id: https://svn.fhem.de/fhem/trunk@12689 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8d7d815c60
commit
151b17a4f8
@ -677,10 +677,7 @@ HUEDevice_Set($@)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{InSetExtensions} = 1;
|
return SetExtensions($hash, $list, $name, @aa);
|
||||||
my $ret = SetExtensions($hash, $list, $name, @aa);
|
|
||||||
delete $hash->{InSetExtensions};
|
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $cmd eq 'rename' ) {
|
if( $cmd eq 'rename' ) {
|
||||||
@ -750,11 +747,7 @@ HUEDevice_Set($@)
|
|||||||
$result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/state",\%obj);
|
$result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/state",\%obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !$hash->{InSetExtensions} ) {
|
|
||||||
SetExtensionsCancel($hash);
|
SetExtensionsCancel($hash);
|
||||||
my $at = $name ."_till";
|
|
||||||
CommandDelete(undef, $at) if($defs{$at});
|
|
||||||
}
|
|
||||||
|
|
||||||
if( defined($result) && $result->{'error'} ) {
|
if( defined($result) && $result->{'error'} ) {
|
||||||
$hash->{STATE} = $result->{'error'}->{'description'};
|
$hash->{STATE} = $result->{'error'}->{'description'};
|
||||||
@ -793,11 +786,7 @@ 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";
|
||||||
|
|
||||||
$hash->{InSetExtensions} = 1;
|
return SetExtensions($hash, $list, $name, @aa);
|
||||||
my $ret = SetExtensions($hash, $list, $name, @aa);
|
|
||||||
delete $hash->{InSetExtensions};
|
|
||||||
|
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
|
@ -218,6 +218,8 @@ readingsProxy_Set($@)
|
|||||||
}
|
}
|
||||||
return SetExtensions($hash,$setList,$name,@a) if( !$found );
|
return SetExtensions($hash,$setList,$name,@a) if( !$found );
|
||||||
|
|
||||||
|
SetExtensionsCancel($hash);
|
||||||
|
|
||||||
my $v = join(" ", @a);
|
my $v = join(" ", @a);
|
||||||
my $set_fn = AttrVal( $hash->{NAME}, "setFn", "" );
|
my $set_fn = AttrVal( $hash->{NAME}, "setFn", "" );
|
||||||
if( $set_fn =~ m/^{.*}$/s ) {
|
if( $set_fn =~ m/^{.*}$/s ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user