From bba7e3ffaaa0c663f5996c8d2ca13fb731cdacec Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Wed, 14 Feb 2018 06:12:26 +0000 Subject: [PATCH] 30_HUEBridge.pm: fixed onoff handling for createGroupReadings git-svn-id: https://svn.fhem.de/fhem/trunk@16172 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/30_HUEBridge.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/30_HUEBridge.pm b/fhem/FHEM/30_HUEBridge.pm index bda13bdd9..c03e71fab 100644 --- a/fhem/FHEM/30_HUEBridge.pm +++ b/fhem/FHEM/30_HUEBridge.pm @@ -1089,13 +1089,13 @@ HUEBridge_updateGroups($$) $readings{pct} = 0; $readings{state} = 'off'; } + $readings{onoff} = $readings{on}?'1':'0'; + delete $readings{on}; readingsBeginUpdate($chash); foreach my $key ( keys %readings ) { if( defined($readings{$key}) ) { - my $reading = $key; - $reading = 'onoff' if( $reading eq 'on' ); - readingsBulkUpdate($chash, $reading, $readings{$key}, 1) if( !defined($chash->{helper}{$key}) || $chash->{helper}{$key} ne $readings{$key} ); + readingsBulkUpdate($chash, $key, $readings{$key}, 1) if( !defined($chash->{helper}{$key}) || $chash->{helper}{$key} ne $readings{$key} ); $chash->{helper}{$key} = $readings{$key}; } }