diff --git a/CHANGED b/CHANGED
index dc18c0d41..d312b4f72 100644
--- a/CHANGED
+++ b/CHANGED
@@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - feature: 31_HUEDevice: added gesture reading for Aqara Cube
+ added readingList attribute
- feature: 50_SSChatBot: new getter apiInfo
- feature: 49_SSCam: new getter apiInfo
- bugfix: 10_SOMFY: corrected autostore rolling code (esp. restart)
diff --git a/FHEM/31_HUEDevice.pm b/FHEM/31_HUEDevice.pm
index 1dca74815..19d27cf7e 100644
--- a/FHEM/31_HUEDevice.pm
+++ b/FHEM/31_HUEDevice.pm
@@ -186,6 +186,7 @@ sub HUEDevice_Initialize($)
"setList:textField-long ".
"configList:textField-long ".
"subType:extcolordimmer,colordimmer,ctdimmer,dimmer,switch,blind ".
+ "readingList ".
$readingFnAttributes;
#$hash->{FW_summaryFn} = "HUEDevice_summaryFn";
@@ -1621,6 +1622,12 @@ HUEDevice_Parse($$)
#Aqara Cube
$readings{gesture} = $state->{gesture} if( defined($state->{gesture}) );
+
+ if( my $entries = $hash->{helper}{readingList} ) {
+ foreach my $entry (@{$entries}) {
+ $readings{$entry} = $state->{$entry} if( defined($state->{$entry}) );
+ }
+ }
}
$hash->{lastupdated} = ReadingsVal( $name, '.lastupdated', '' ) if( !$hash->{lastupdated} );
@@ -1882,6 +1889,15 @@ HUEDevice_Attr($$$;$)
}
}
}
+
+ } elsif( $attrName eq 'readingList' ) {
+ my $hash = $defs{$name};
+ delete $hash->{helper}{$attrName};
+ return "$name is not a sensor device" if( $hash->{helper}->{devtype} ne 'S' );
+ if( $cmd eq "set" && $attrVal ) {
+ my @a = split("[ ,]+", $attrVal);
+ $hash->{helper}{$attrName} = \@a;
+ }
}
return;
@@ -2055,6 +2071,8 @@ absent:{<json>}
The list of know config commands for sensor type devices. one command per line, eg.:
+
attr mySensor mode:{<json>}\
/heatsetpoint (.*)/:perl:{'{"heatsetpoint":'. $VALUE1 * 100 .'}'}