Skip to content

Commit

Permalink
Fix errors in ZigBeeConverterFanControl.initializeDevice (#496)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
  • Loading branch information
cdjackson committed Sep 28, 2019
1 parent c1ea273 commit bc8398b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -29,7 +29,6 @@
import com.zsmartsystems.zigbee.ZigBeeEndpoint;
import com.zsmartsystems.zigbee.zcl.ZclAttribute;
import com.zsmartsystems.zigbee.zcl.ZclAttributeListener;
import com.zsmartsystems.zigbee.zcl.clusters.ZclDoorLockCluster;
import com.zsmartsystems.zigbee.zcl.clusters.ZclFanControlCluster;
import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType;

Expand All @@ -54,7 +53,8 @@ public class ZigBeeConverterFanControl extends ZigBeeBaseChannelConverter implem

@Override
public boolean initializeDevice() {
ZclDoorLockCluster serverCluster = (ZclDoorLockCluster) endpoint.getInputCluster(ZclDoorLockCluster.CLUSTER_ID);
ZclFanControlCluster serverCluster = (ZclFanControlCluster) endpoint
.getInputCluster(ZclFanControlCluster.CLUSTER_ID);
if (serverCluster == null) {
logger.error("{}: Error opening device fan controls", endpoint.getIeeeAddress());
return false;
Expand Down Expand Up @@ -133,7 +133,7 @@ public Channel getChannel(ThingUID thingUID, ZigBeeEndpoint endpoint) {

return ChannelBuilder
.create(createChannelUID(thingUID, endpoint, ZigBeeBindingConstants.CHANNEL_NAME_FANCONTROL),
ZigBeeBindingConstants.ITEM_TYPE_SWITCH)
ZigBeeBindingConstants.ITEM_TYPE_NUMBER)
.withType(ZigBeeBindingConstants.CHANNEL_FANCONTROL)
.withLabel(ZigBeeBindingConstants.CHANNEL_LABEL_FANCONTROL).withProperties(createProperties(endpoint))
.build();
Expand Down

0 comments on commit bc8398b

Please sign in to comment.