2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

31_HUEDevice.pm: ramp time fix for pct 0. see forum: https://forum.fhem.de/index.php/topic,77948.0/

git-svn-id: https://svn.fhem.de/fhem/trunk@15247 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2017-10-13 19:18:21 +00:00
parent 12e3a8d5dc
commit 6b80281c5b

View File

@ -393,7 +393,10 @@ HUEDevice_SetParam($$@)
$cmd = 'bri';
}
$cmd = "off" if($cmd eq "pct" && $value == 0 );
if($cmd eq "pct" && $value == 0 ) {
$cmd = "off";
$value = $value2;
}
if($cmd eq 'on') {
$obj->{'on'} = JSON::true;
@ -1129,8 +1132,7 @@ HUEDevice_Parse($$)
my $s = '';
my $pct = -1;
my $on = $state->{on}; $readings{on} = $hash->{helper}{onoff} if( !defined($on) );
if( $on )
{
if( $on ) {
$s = 'on';
$readings{onoff} = 1;
@ -1144,11 +1146,8 @@ HUEDevice_Parse($$)
$s = $dim_values{int($pct/7)};
}
$s = 'off' if( $pct == 0 );
}
}
else
{
} else {
$on = 0;
$s = 'off';
$pct = 0;