10_CUL_HM:cut text if too long for dis-wm

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7960 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876
2015-02-13 19:20:45 +00:00
parent 95a46f92df
commit 54125489fb

View File

@@ -5051,10 +5051,7 @@ sub CUL_HM_calcDisWmSet($){
my $dh = shift;
my ($txt,$col,$icon) = eval $dh->{exe};
if ($txt eq "off") { delete $dh->{txt};}
elsif($txt ne "nc"){
if (length($txt)>12){ delete $dh->{txt};}
else { $dh->{txt} = $txt; }
}
elsif($txt ne "nc") { $dh->{txt} = substr($txt,0,12);}
if($col eq "off") { delete $dh->{col};}
elsif($col ne "nc"){