From 6360a3e434d5577274ccafa5e183df8d182f7964 Mon Sep 17 00:00:00 2001 From: justme1968 Date: Tue, 3 May 2016 11:16:58 +0000 Subject: [PATCH] 31_HUEDevice.pm: removed warning git-svn-id: https://svn.fhem.de/fhem/trunk@11377 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/31_HUEDevice.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index 0580c8135..62fd44605 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -266,8 +266,6 @@ sub HUEDevice_Define($$) $hash->{helper}{xy} = ''; $hash->{helper}{alert} = ''; $hash->{helper}{effect} = ''; - $hash->{helper}{all_on} = -1; - $hash->{helper}{any_on} = -1; $hash->{helper}{percent} = -1; $hash->{helper}{rgb} = ""; @@ -279,6 +277,10 @@ sub HUEDevice_Define($$) } elsif( $hash->{helper}->{devtype} eq 'G' ) { $hash->{DEF} = "group $id $args[3]"; + + $hash->{helper}{all_on} = -1; + $hash->{helper}{any_on} = -1; + $attr{$name}{delayedUpdate} = 1 if( !defined( $attr{$name}{delayedUpdate} ) ); $attr{$name}{devStateIcon} = '{(HUEDevice_devStateIcon($name),"toggle")}' if( !defined( $attr{$name}{devStateIcon} ) ); @@ -987,8 +989,8 @@ HUEDevice_Parse($$) my $any_on = $result->{state}{any_on}; readingsBeginUpdate($hash); - readingsBulkUpdate($hash, "all_on", $result->{state}{all_on}) if( defined($all_on) && $all_on != $hash->{helper}{all_on} ); - readingsBulkUpdate($hash, "any_on", $result->{state}{any_on}) if( defined($any_on) && $any_on != $hash->{helper}{any_on} ); + readingsBulkUpdate($hash, "all_on", $all_on) if( defined($all_on) && $all_on != $hash->{helper}{all_on} ); + readingsBulkUpdate($hash, "any_on", $any_on) if( defined($any_on) && $any_on != $hash->{helper}{any_on} ); readingsEndUpdate($hash,1); $hash->{helper}{all_on} = $all_on if( defined($all_on) );