Color::devStateIcon: ignore non digits in pct reading

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8134 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme1968
2015-03-02 19:01:56 +00:00
parent 7bb21615c1
commit c482ca033a

View File

@@ -387,6 +387,8 @@ devStateIcon($$@)
$percent = ::Value($name);
}
$percent =~ s/[^\d]//g if( $percent );
return ".*:light_question" if( !defined($percent) );
my $s = $dim_values{int($percent/7)};