diff --git a/bundles/org.openhab.binding.danfossairunit/src/main/java/org/openhab/binding/danfossairunit/internal/DanfossAirUnitHandler.java b/bundles/org.openhab.binding.danfossairunit/src/main/java/org/openhab/binding/danfossairunit/internal/DanfossAirUnitHandler.java index 19514396a1ac5..f1bc9ddb1cb23 100644 --- a/bundles/org.openhab.binding.danfossairunit/src/main/java/org/openhab/binding/danfossairunit/internal/DanfossAirUnitHandler.java +++ b/bundles/org.openhab.binding.danfossairunit/src/main/java/org/openhab/binding/danfossairunit/internal/DanfossAirUnitHandler.java @@ -164,7 +164,12 @@ private synchronized void stopPolling() { } private void updateState(String groupId, String channelId, State state) { - if (valueCache.updateValue(channelId, state)) { + ValueCache cache = valueCache; + if (cache == null) { + return; + } + + if (cache.updateValue(channelId, state)) { updateState(new ChannelUID(thing.getUID(), groupId, channelId), state); } }