Skip to content

Commit

Permalink
Monitor responses to commands on several channel converters (#715)
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 Dec 2, 2021
1 parent 8ca7904 commit 603976e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void handleCommand(final Command command) {
return;
}

fanModeAttribute.writeValue(value);
monitorCommandResponse(command, fanModeAttribute.writeValue(value));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void handleCommand(final Command command) {
return;
}

attribute.writeValue(value);
monitorCommandResponse(command, attribute.writeValue(value));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void handleCommand(final Command command) {
return;
}

attribute.writeValue(value);
monitorCommandResponse(command, attribute.writeValue(value));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void disposeConverter() {

@Override
public void handleRefresh() {
cluster.read(cluster.getAttribute(ZclThermostatCluster.ATTR_THERMOSTATRUNNINGMODE));
cluster.readAttribute(ZclThermostatCluster.ATTR_THERMOSTATRUNNINGMODE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void handleCommand(final Command command) {
return;
}

attribute.writeValue(value);
monitorCommandResponse(command, attribute.writeValue(value));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void handleCommand(final Command command) {
return;
}

attribute.writeValue(value);
monitorCommandResponse(command, attribute.writeValue(value));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void handleCommand(final Command command) {
return;
}

attribute.writeValue(value);
monitorCommandResponse(command, attribute.writeValue(value));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import java.util.Set;
import java.util.concurrent.ExecutionException;

import org.openhab.binding.zigbee.ZigBeeBindingConstants;
import org.openhab.binding.zigbee.converter.ZigBeeBaseChannelConverter;
import org.openhab.binding.zigbee.handler.ZigBeeThingHandler;
import org.openhab.binding.zigbee.internal.converter.config.ZclReportingConfig;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.library.types.StopMoveType;
import org.openhab.core.library.types.UpDownType;
Expand All @@ -25,10 +29,6 @@
import org.openhab.core.thing.binding.builder.ChannelBuilder;
import org.openhab.core.thing.type.AutoUpdatePolicy;
import org.openhab.core.types.Command;
import org.openhab.binding.zigbee.ZigBeeBindingConstants;
import org.openhab.binding.zigbee.converter.ZigBeeBaseChannelConverter;
import org.openhab.binding.zigbee.handler.ZigBeeThingHandler;
import org.openhab.binding.zigbee.internal.converter.config.ZclReportingConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -177,7 +177,7 @@ public void handleCommand(final Command command) {
return;
}

clusterServer.sendCommand(zclCommand);
monitorCommandResponse(command, clusterServer.sendCommand(zclCommand));
}

@Override
Expand Down Expand Up @@ -215,7 +215,6 @@ public Channel getChannel(ThingUID thingUID, ZigBeeEndpoint endpoint) {
public void attributeUpdated(ZclAttribute attribute, Object value) {
logger.debug("{}: ZigBee attribute reports {}", endpoint.getIeeeAddress(), attribute);
if (attribute.getId() == ZclWindowCoveringCluster.ATTR_CURRENTPOSITIONLIFTPERCENTAGE) {

updateChannelState(new PercentType((Integer) value));
}
}
Expand Down

0 comments on commit 603976e

Please sign in to comment.