mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 13:26:02 +00:00
31_HUEDevice.pm: allow transitiontime in set scene
git-svn-id: https://svn.fhem.de/fhem/trunk@12551 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d6561bbb80
commit
6c59336b8c
@ -606,9 +606,23 @@ HUEDevice_Set($@)
|
|||||||
return fhem( "set $hash->{IODev}{NAME} deletescene $aa[1]" );
|
return fhem( "set $hash->{IODev}{NAME} deletescene $aa[1]" );
|
||||||
|
|
||||||
} elsif( $cmd eq 'scene' ) {
|
} elsif( $cmd eq 'scene' ) {
|
||||||
return "usage: scene <id>" if( @args != 1 );
|
return "usage: scene <id>" if( @args < 1 );
|
||||||
|
|
||||||
my $obj = { 'scene' => $aa[1] };
|
my $obj = {};
|
||||||
|
if( (my $joined = join(" ", @aa)) =~ /:/ ) {
|
||||||
|
my @cmds = split(":", $joined);
|
||||||
|
for( my $i = 0; $i <= $#cmds; ++$i ) {
|
||||||
|
my @parts = split(" ", $cmds[$i]);
|
||||||
|
|
||||||
|
if( $parts[0] eq 'scene' ) {
|
||||||
|
$obj->{'scene'} = $parts[1];
|
||||||
|
} else {
|
||||||
|
HUEDevice_SetParam($name, $obj, @parts );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$obj->{scene} = $aa[1];
|
||||||
|
}
|
||||||
$hash->{helper}->{update} = 1;
|
$hash->{helper}->{update} = 1;
|
||||||
my $result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/action",$obj);
|
my $result = HUEDevice_ReadFromServer($hash,"$hash->{ID}/action",$obj);
|
||||||
return $result->{error}{description} if( $result->{error} );
|
return $result->{error}{description} if( $result->{error} );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user