ENIGMA2: improved return values for channel command

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9054 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
loredo
2015-08-09 16:31:54 +00:00
parent 568201293c
commit eed6bc02d8

View File

@@ -626,9 +626,16 @@ sub ENIGMA2_Set($@) {
$result = ENIGMA2_SendCommand( $hash, "remotecontrol",
"command=" . ENIGMA2_GetRemotecontrolCommand("OK") );
}
elsif ( m/^\d+$/ && ( $_ <= 0 || $_ >= 10000 ) ) {
return "Numeric channel addressing '" . $_
. "' needs to be a number between 1 and 9999.";
}
else {
return "Argument " . $_
. " is not a valid integer between 0 and 9999 or servicereference is invalid";
return
"'"
. $_
. "' does not seem to be a valid channel. Known channels: "
. $channels;
}
}
else {