Skip to content

Commit

Permalink
treat fan speed command of 0 as OFF
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Cutrer <[email protected]>
  • Loading branch information
ccutrer committed Dec 4, 2024
1 parent f91b729 commit be801c5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ private void handleFanCommand(final String channelId, final Command command) {
break;
case CHANNEL_SPEED:
if (command instanceof DecimalType numberCommand) {
handleFanSpeedCommand(numberCommand);
if (numberCommand.equals(DecimalType.ZERO)) {
handleFanOnOffCommand(OnOffType.OFF);
} else {
handleFanSpeedCommand(numberCommand);
}
}
break;
case CHANNEL_REVERSE:
Expand Down

0 comments on commit be801c5

Please sign in to comment.