Skip to content

Commit

Permalink
Backport of openhab#1460
Browse files Browse the repository at this point in the history
This allows group items who are not exactly the same base item to be included in logic operations, for example a dimmer can now be included in a group switch item.
  • Loading branch information
digitaldan committed Feb 22, 2016
1 parent 290cc11 commit 8c15096
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public And(State activeValue, State passiveValue) {
public State calculate(List<Item> 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;
}
}
Expand Down Expand Up @@ -132,7 +132,7 @@ public Or(State activeValue, State passiveValue) {
public State calculate(List<Item> items) {
if(items!=null) {
for(Item item : items) {
if(activeState.equals(item.getState())) {
if(activeState.equals(item.getStateAs(activeState.getClass()))) {
return activeState;
}
}
Expand Down

0 comments on commit 8c15096

Please sign in to comment.