Skip to content

Commit

Permalink
openhab#14 Check if StopMoveType is STOP in ShutterControlHandler bef…
Browse files Browse the repository at this point in the history
…ore setting the device state

Signed-off-by: Christian Oeing <[email protected]>
  • Loading branch information
coeing committed Nov 18, 2020
1 parent 21023f5 commit 7cd4644
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ public void handleCommand(ChannelUID channelUID, Command command) {
}
this.shutterControlService.setState(state);
} else if (command instanceof StopMoveType) {
// Set STOPPED operation state
ShutterControlServiceState state = new ShutterControlServiceState();
state.operationState = OperationState.STOPPED;
this.shutterControlService.setState(state);
StopMoveType stopMoveType = (StopMoveType) command;
if (stopMoveType == StopMoveType.STOP) {
// Set STOPPED operation state
ShutterControlServiceState state = new ShutterControlServiceState();
state.operationState = OperationState.STOPPED;
this.shutterControlService.setState(state);
}
} else if (command instanceof PercentType) {
// Set specific level
PercentType percentType = (PercentType) command;
Expand Down

0 comments on commit 7cd4644

Please sign in to comment.