diff --git a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/LightThingHandler.java b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/LightThingHandler.java index b7fc33b7b127f..a22658e7c0015 100644 --- a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/LightThingHandler.java +++ b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/LightThingHandler.java @@ -262,14 +262,18 @@ private void valueUpdated(String channelId, LightState newState) { } break; case CHANNEL_COLOR: - double @Nullable [] xy = newState.xy; - Integer hue = newState.hue; - Integer sat = newState.sat; - if (hue != null && sat != null && bri != null) { - updateState(channelId, - new HSBType(new DecimalType(hue / HUE_FACTOR), toPercentType(sat), toPercentType(bri))); - } else if (xy != null && xy.length == 2) { - updateState(channelId, HSBType.fromXY((float) xy[0], (float) xy[1])); + if (on != null && on == false) { + updateState(channelId, OnOffType.OFF); + } else { + double @Nullable [] xy = newState.xy; + Integer hue = newState.hue; + Integer sat = newState.sat; + if (hue != null && sat != null && bri != null) { + updateState(channelId, + new HSBType(new DecimalType(hue / HUE_FACTOR), toPercentType(sat), toPercentType(bri))); + } else if (xy != null && xy.length == 2) { + updateState(channelId, HSBType.fromXY((float) xy[0], (float) xy[1])); + } } break; case CHANNEL_BRIGHTNESS: