From 4485a723bb2ee2eaf02b6ed13c3a78d5f5420432 Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Mon, 16 Sep 2019 13:19:54 +0100 Subject: [PATCH] Fix bug setting level control reporting configuration (#484) Signed-off-by: Chris Jackson --- .../internal/converter/ZigBeeConverterSwitchLevel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterSwitchLevel.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterSwitchLevel.java index 14e3c7730..a28f6590e 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterSwitchLevel.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterSwitchLevel.java @@ -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; @@ -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(),