From 935da812e903ecee86bce8a679066a75a812b38f Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Thu, 25 Apr 2013 13:28:36 +0000 Subject: [PATCH] bug fix for plugin dimmer git-svn-id: https://svn.fhem.de/fhem/trunk@3115 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/31_HUEDevice.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index 69290e91f..1fe2ed3ea 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -472,7 +472,7 @@ HUEDevice_GetUpdate($) my $ct = $state->{'ct'}; my $hue = $state->{'hue'}; my $sat = $state->{'sat'}; - my $xy = ","; + my $xy = undef; $xy = $state->{'xy'}->[0] .",". $state->{'xy'}->[1] if( defined($state->{'xy'}) ); if( defined($colormode) && $colormode ne $hash->{fhem}{colormode} ) {readingsBulkUpdate($hash,"colormode",$colormode);} @@ -487,8 +487,7 @@ HUEDevice_GetUpdate($) } if( defined($hue) && $hue != $hash->{fhem}{hue} ) {readingsBulkUpdate($hash,"hue",$hue);} if( defined($sat) && $sat != $hash->{fhem}{sat} ) {readingsBulkUpdate($hash,"sat",$sat);} - if( $xy eq "," && $xy ne $hash->{fhem}{xy} ) {readingsBulkUpdate($hash,"xy","");} - elsif( $xy ne $hash->{fhem}{xy} ) {readingsBulkUpdate($hash,"xy",$xy);} + if( defined($xy) && $xy ne $hash->{fhem}{xy} ) {readingsBulkUpdate($hash,"xy",$xy);} my $s = ''; if( $on )