2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

ENIGMA2: fix showText setter

git-svn-id: https://svn.fhem.de/fhem/trunk@13984 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-04-13 22:34:15 +00:00
parent 4e6880616f
commit fffb85cb38

View File

@ -757,21 +757,10 @@ sub ENIGMA2_Set($@) {
elsif ( lc($set) eq "showtext" ) {
if ( $state ne "absent" || $ignoreState ne "0" ) {
return "No argument given, choose one of messagetext "
if ( !defined( $a->[0] ) );
unless (@$a);
Log3 $name, 3, "ENIGMA2 set $name " . $set;
my $i = 2;
my $text = $a->[$i];
$i++;
if ( defined( $a->[$i] ) ) {
my $arr_size = @$a;
while ( $i < $arr_size ) {
$text = $text . " " . $a->[$i];
$i++;
}
}
$cmd = "type=1&timeout=8&text=" . urlEncode($text);
$cmd = "type=1&timeout=8&text=" . urlEncode( join( " ", @$a ) );
Log3 $name, 3, "ENIGMA2 set $name $set";
$result = ENIGMA2_SendCommand( $hash, "message", $cmd );
}
else {