diff --git a/bundles/core/org.openhab.core.library/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java b/bundles/core/org.openhab.core.library/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java index 498f5134aa2..aad9ee40f9c 100644 --- a/bundles/core/org.openhab.core.library/src/main/java/org/openhab/core/library/types/ArithmeticGroupFunction.java +++ b/bundles/core/org.openhab.core.library/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; } }