Color::devStateIcon: ignore non digits in pct reading

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8134 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-03-02 19:01:56 +00:00
parent fdec64b2a0
commit cbd48b25d0

View File

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