mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 20:52:13 +00:00
Color.pm: some more optimizations (by Beta-User)
git-svn-id: https://svn.fhem.de/fhem/trunk@20754 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
60269275ca
commit
1c203c5d71
@ -468,8 +468,9 @@ devStateIcon($$@)
|
||||
return ".*:light_question" if( !defined($percent) );
|
||||
return ".*:light_question" if( $percent =~ m/^set/i );
|
||||
|
||||
return ".*:on:toggle" if( $percent eq "on" );
|
||||
return ".*:off:toggle" if( $onoff && ::ReadingsVal($name,$onoff,'') =~ m/(0|off$)/i );
|
||||
return ".*:off:toggle" if( $percent eq "off" );
|
||||
return ".*:on:toggle" if( $percent eq "on" );
|
||||
|
||||
$percent =~ s/[^\d]//g if( $percent );
|
||||
|
||||
@ -507,6 +508,8 @@ devStateIcon($$@)
|
||||
$s = $dim_values{int($percent/7)} if( $percent && $percent < 100 );
|
||||
}
|
||||
|
||||
return ".*:$s:toggle" if( $value eq "000000" ); #for rgbww in white mode
|
||||
|
||||
return ".*:$s@#$value:toggle";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user