2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

compatibility fix

git-svn-id: https://svn.fhem.de/fhem/trunk@6525 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2014-09-09 10:04:56 +00:00
parent aa9a113ecf
commit 795332ff86

View File

@ -231,7 +231,10 @@ HUEDevice_SetParam($$@)
} elsif( $cmd eq "toggle" ) {
$cmd = ReadingsVal($name,"state","on") eq "off" ? "on" :"off";
} elsif( $cmd =~ m/^dim(\d+)/ ) {
$value = $1 unless defined($value);
if( defined($1) ) {
$value2 = $value;
$value = $1;
}
if( $value < 0 ) { $value = 0; }
if( $value > 100 ) { $value = 100; }
$cmd = 'pct';