diff --git a/bundles/org.openhab.core.compat1x/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java b/bundles/org.openhab.core.compat1x/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java index 8674bbfdb47..fe0794e4ca9 100644 --- a/bundles/org.openhab.core.compat1x/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java +++ b/bundles/org.openhab.core.compat1x/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java @@ -57,7 +57,7 @@ public And(State activeValue, State passiveValue) { public State calculate(List items) { if(items!=null && items.size()>0) { for(Item item : items) { - if(!activeState.equals(item.getState())) { + if(!activeState.equals(item.getStateAs(activeState.getClass()))) { return passiveState; } } @@ -132,7 +132,7 @@ public Or(State activeValue, State passiveValue) { public State calculate(List items) { if(items!=null) { for(Item item : items) { - if(activeState.equals(item.getState())) { + if(activeState.equals(item.getStateAs(activeState.getClass()))) { return activeState; } }