From c7ca0dd32853ce6a44d4826d7b1767a87e3d904f Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Sun, 9 Aug 2015 16:31:54 +0000 Subject: [PATCH] ENIGMA2: improved return values for channel command git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9054 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/70_ENIGMA2.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/FHEM/70_ENIGMA2.pm b/FHEM/70_ENIGMA2.pm index b18457ab8..d73bc252b 100644 --- a/FHEM/70_ENIGMA2.pm +++ b/FHEM/70_ENIGMA2.pm @@ -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 {