mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
30_HUEBridge.pm: fixed onoff handling for createGroupReadings
git-svn-id: https://svn.fhem.de/fhem/trunk@16172 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a2609b315c
commit
bba7e3ffaa
@ -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};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user