Skip to content

Commit

Permalink
Fix bug setting level control reporting configuration (#484)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <[email protected]>
  • Loading branch information
cdjackson authored Sep 16, 2019
1 parent c5c5fb4 commit 4485a72
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import com.zsmartsystems.zigbee.ZigBeeEndpoint;
import com.zsmartsystems.zigbee.zcl.ZclAttribute;
import com.zsmartsystems.zigbee.zcl.ZclAttributeListener;
import com.zsmartsystems.zigbee.zcl.clusters.ZclIlluminanceMeasurementCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclLevelControlCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclOnOffCluster;
import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType;
Expand Down Expand Up @@ -241,14 +240,14 @@ public void updateConfiguration(@NonNull Configuration currentConfiguration,
ZclAttribute attribute;
CommandResult reportingResponse;

attribute = clusterOnOff.getAttribute(ZclIlluminanceMeasurementCluster.ATTR_MEASUREDVALUE);
attribute = clusterOnOff.getAttribute(ZclOnOffCluster.ATTR_ONOFF);
reportingResponse = attribute
.setReporting(configReporting.getReportingTimeMin(), configReporting.getReportingTimeMax())
.get();
handleReportingResponse(reportingResponse, configReporting.getPollingPeriod(),
configReporting.getReportingTimeMax());

attribute = clusterLevelControl.getAttribute(ZclIlluminanceMeasurementCluster.ATTR_MEASUREDVALUE);
attribute = clusterLevelControl.getAttribute(ZclLevelControlCluster.ATTR_CURRENTLEVEL);
reportingResponse = attribute.setReporting(configReporting.getReportingTimeMin(),
configReporting.getReportingTimeMax(), configReporting.getReportingChange()).get();
handleReportingResponse(reportingResponse, configReporting.getPollingPeriod(),
Expand Down

0 comments on commit 4485a72

Please sign in to comment.