mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
31_LightScene.pm: fixed error message for set scene on non existing scene
git-svn-id: https://svn.fhem.de/fhem/trunk@11642 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0d248aafc0
commit
66b598cf11
@ -598,12 +598,12 @@ LightScene_Set($@)
|
||||
if( $cmd eq "rename" && !defined( $scene ) ) { return "Usage: set $name rename <scene_alt> <scene_neu>" };
|
||||
|
||||
if( $cmd eq "remove" ) {
|
||||
return "no such scene $scene" if( !defined $hash->{SCENES}{$scene} );
|
||||
return "no such scene: $scene" if( !defined $hash->{SCENES}{$scene} );
|
||||
delete( $hash->{SCENES}{$scene} );
|
||||
return undef;
|
||||
|
||||
} elsif( $cmd eq "rename" ) {
|
||||
return "no such scene $scene" if( !defined $hash->{SCENES}{$scene} );
|
||||
return "no such scene: $scene" if( !defined $hash->{SCENES}{$scene} );
|
||||
my ($new) = @a;
|
||||
if( !( $new ) ) { return "Usage: set $name rename <scene_alt> <scene_neu>" };
|
||||
|
||||
@ -611,11 +611,14 @@ LightScene_Set($@)
|
||||
delete( $hash->{SCENES}{$scene} );
|
||||
return undef;
|
||||
|
||||
} elsif( $cmd eq "scene" ) {
|
||||
return "no such scene: $scene" if( !defined $hash->{SCENES}{$scene} );
|
||||
|
||||
} elsif( $cmd eq "set" || $cmd eq "setcmd" ) {
|
||||
my ($d, @args) = @a;
|
||||
|
||||
if( !defined( $scene ) || !defined( $d ) ) { return "Usage: set $name set <scene_name> <device> [<cmd>]" };
|
||||
return "no stored scene >$scene<" if( !defined($hash->{SCENES}{$scene} ) );
|
||||
return "no such scene: $scene" if( !defined $hash->{SCENES}{$scene} );
|
||||
#return "device >$d< is not a member of scene >$scene<" if( !defined($hash->{CONTENT}{$d} ) );
|
||||
|
||||
if( !@args ) {
|
||||
|
Loading…
Reference in New Issue
Block a user