From be801c5fab42a1ef89945e52a01371dd6560a4c8 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 4 Dec 2024 08:12:26 -0700 Subject: [PATCH] treat fan speed command of 0 as OFF Signed-off-by: Cody Cutrer --- .../openhab/binding/wiz/internal/handler/WizHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java b/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java index 6befaea444d06..1b91a47ebf7f0 100644 --- a/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java +++ b/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java @@ -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: