color::devStateIcon: accept on and off in reading for $pct
git-svn-id: https://svn.fhem.de/fhem/trunk@8135 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -387,10 +387,13 @@ devStateIcon($$@)
|
||||
$percent = ::Value($name);
|
||||
}
|
||||
|
||||
$percent =~ s/[^\d]//g if( $percent );
|
||||
|
||||
return ".*:light_question" if( !defined($percent) );
|
||||
|
||||
return ".*:on:toggle" if( $percent eq "on" );
|
||||
return ".*:off:toggle" if( $percent eq "off" );
|
||||
|
||||
$percent =~ s/[^\d]//g if( $percent );
|
||||
|
||||
my $s = $dim_values{int($percent/7)};
|
||||
$s="off" if( $percent eq "0" );
|
||||
$s="on" if( $percent eq "100" );
|
||||
|
||||
Reference in New Issue
Block a user