From c20b0a63041bd8aafb6bcedd11111edc61c5ac8f Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 24 Jul 2024 01:08:08 -0600 Subject: [PATCH] [homekit] Fix linking a Lighting to a Group:Dimmer (#17139) Signed-off-by: Cody Cutrer Signed-off-by: Ciprian Pascu --- .../org/openhab/io/homekit/internal/HomekitOHItemProxy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitOHItemProxy.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitOHItemProxy.java index 09bde48b7e9..f51f8dfa049 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitOHItemProxy.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/HomekitOHItemProxy.java @@ -97,7 +97,7 @@ public class HomekitOHItemProxy { final PercentType brightness = (PercentType) commandCache.remove(BRIGHTNESS_COMMAND); final DecimalType hue = (DecimalType) commandCache.remove(HUE_COMMAND); final PercentType saturation = (PercentType) commandCache.remove(SATURATION_COMMAND); - final @Nullable OnOffType currentOnState = ((DimmerItem) item).getStateAs(OnOffType.class); + final @Nullable OnOffType currentOnState = item.getStateAs(OnOffType.class); if (on != null) { // always sends OFF. // sends ON only if