mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +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;
|
||||
my $ret = SetExtensions($hash, $list, $name, @aa);
|
||||
delete $hash->{InSetExtensions};
|
||||
return $ret;
|
||||
return SetExtensions($hash, $list, $name, @aa);
|
||||
}
|
||||
|
||||
if( $cmd eq 'rename' ) {
|
||||
@ -750,11 +747,7 @@ HUEDevice_Set($@)
|
||||
$result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/state",\%obj);
|
||||
}
|
||||
|
||||
if( !$hash->{InSetExtensions} ) {
|
||||
SetExtensionsCancel($hash);
|
||||
my $at = $name ."_till";
|
||||
CommandDelete(undef, $at) if($defs{$at});
|
||||
}
|
||||
SetExtensionsCancel($hash);
|
||||
|
||||
if( defined($result) && $result->{'error'} ) {
|
||||
$hash->{STATE} = $result->{'error'}->{'description'};
|
||||
@ -793,11 +786,7 @@ HUEDevice_Set($@)
|
||||
$list .= " savescene deletescene scene" if( $hash->{helper}->{devtype} eq 'G' );
|
||||
$list .= " rename";
|
||||
|
||||
$hash->{InSetExtensions} = 1;
|
||||
my $ret = SetExtensions($hash, $list, $name, @aa);
|
||||
delete $hash->{InSetExtensions};
|
||||
|
||||
return $ret;
|
||||
return SetExtensions($hash, $list, $name, @aa);
|
||||
}
|
||||
|
||||
sub
|
||||
|
@ -218,6 +218,8 @@ readingsProxy_Set($@)
|
||||
}
|
||||
return SetExtensions($hash,$setList,$name,@a) if( !$found );
|
||||
|
||||
SetExtensionsCancel($hash);
|
||||
|
||||
my $v = join(" ", @a);
|
||||
my $set_fn = AttrVal( $hash->{NAME}, "setFn", "" );
|
||||
if( $set_fn =~ m/^{.*}$/s ) {
|
||||
|
Loading…
Reference in New Issue
Block a user