fix channel updates (#8563)

Signed-off-by: Hans Böhm <h.boehm@gmx.at>
This commit is contained in:
boehan 2020-09-24 19:52:17 +02:00 committed by GitHub
parent daccb66b43
commit 099ae8f06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

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