From 66b598cf113dda05811912cce8309f6fb91c14fa Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Fri, 10 Jun 2016 13:10:25 +0000 Subject: [PATCH] 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 --- fhem/FHEM/31_LightScene.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/31_LightScene.pm b/fhem/FHEM/31_LightScene.pm index 1599679d5..d1ab35ddb 100644 --- a/fhem/FHEM/31_LightScene.pm +++ b/fhem/FHEM/31_LightScene.pm @@ -598,12 +598,12 @@ LightScene_Set($@) if( $cmd eq "rename" && !defined( $scene ) ) { return "Usage: set $name rename " }; 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 " }; @@ -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 []" }; - 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 ) {