]> git.basschouten.com Git - openhab-addons.git/commitdiff
fix channel updates (#8563)
authorboehan <boehan@users.noreply.github.com>
Thu, 24 Sep 2020 17:52:17 +0000 (19:52 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Sep 2020 17:52:17 +0000 (19:52 +0200)
Signed-off-by: Hans Böhm <h.boehm@gmx.at>
bundles/org.openhab.binding.comfoair/src/main/java/org/openhab/binding/comfoair/internal/ComfoAirHandler.java

index cfb941a461cf6ef2ba3db109a3cd5333bdda1a09..1cafc3b82646b05c9b0b55fc69ece93dcc7153ce 100644 (file)
@@ -78,7 +78,8 @@ public class ComfoAirHandler extends BaseThingHandler {
             if (changeCommand != null) {
                 Set<String> keysToUpdate = getThing().getChannels().stream().map(Channel::getUID).filter(this::isLinked)
                         .map(ChannelUID::getId).collect(Collectors.toSet());
-                sendCommand(changeCommand, channelId);
+                State state = sendCommand(changeCommand, channelId);
+                updateState(channelUID, state);
 
                 Collection<ComfoAirCommand> affectedReadCommands = ComfoAirCommandType
                         .getAffectedReadCommands(channelId, keysToUpdate);
@@ -429,7 +430,8 @@ public class ComfoAirHandler extends BaseThingHandler {
 
                     for (ComfoAirCommandType commandType : commandTypes) {
                         String commandKey = commandType.getKey();
-                        sendCommand(readCommand, commandKey);
+                        State state = sendCommand(readCommand, commandKey);
+                        updateState(commandKey, state);
                     }
                 }
             }