diff --git a/bundles/org.openhab.io.hueemulation/src/main/java/org/openhab/io/hueemulation/internal/StateUtils.java b/bundles/org.openhab.io.hueemulation/src/main/java/org/openhab/io/hueemulation/internal/StateUtils.java index 21cc00232..5b2916ba1 100644 --- a/bundles/org.openhab.io.hueemulation/src/main/java/org/openhab/io/hueemulation/internal/StateUtils.java +++ b/bundles/org.openhab.io.hueemulation/src/main/java/org/openhab/io/hueemulation/internal/StateUtils.java @@ -450,7 +450,8 @@ public class StateUtils { } } } else if (lastCommand instanceof PercentType) { - if (hueState instanceof HueStateBulb && itemState.as(PercentType.class).equals(lastCommand)) { + if (hueState instanceof HueStateBulb && itemState != null + && lastCommand.equals(itemState.as(PercentType.class))) { if (lastHueChange.bri != null) { ((HueStateBulb) hueState).bri = lastHueChange.bri; }