ENIGMA2: fix showText setter
git-svn-id: https://svn.fhem.de/fhem/trunk@13984 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -757,21 +757,10 @@ sub ENIGMA2_Set($@) {
|
|||||||
elsif ( lc($set) eq "showtext" ) {
|
elsif ( lc($set) eq "showtext" ) {
|
||||||
if ( $state ne "absent" || $ignoreState ne "0" ) {
|
if ( $state ne "absent" || $ignoreState ne "0" ) {
|
||||||
return "No argument given, choose one of messagetext "
|
return "No argument given, choose one of messagetext "
|
||||||
if ( !defined( $a->[0] ) );
|
unless (@$a);
|
||||||
|
|
||||||
Log3 $name, 3, "ENIGMA2 set $name " . $set;
|
$cmd = "type=1&timeout=8&text=" . urlEncode( join( " ", @$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);
|
|
||||||
$result = ENIGMA2_SendCommand( $hash, "message", $cmd );
|
$result = ENIGMA2_SendCommand( $hash, "message", $cmd );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user