Open AnderssonPeter opened 5 months ago
The options inside a filter use AND, multiple different filters use OR. There is a good example of this in the repeating options section of the docs.
This includes entities where the domain is plant OR area is Stuga:
filter:
include:
- domain: plant
- area: Stuga
This includes entities where the domain is plant AND area is Stuga:
filter:
include:
- domain: plant
area: Stuga
@outdooracorn or others :-) I tried to include powercalc entities in two areas like this:
filter:
include:
- integration: powercalc
area:
- cellar
- attic
Based on the example above, I expect to have the areas evaluated as an OR, but is seems to be an AND relation?! The next example works, selecting powercalc entities in area cellar or attic, but is a little silly:
filter:
include:
- integration: powercalc
area: cellar
- integration: powercalc
area: attic
I don't think you can provide a list to area
, but you might be able use the or:
special option (untested):
filter:
include:
- integration: powercalc
or:
- area: cellar
- area: attic
I don't think you can provide a list to
area
, but you might be able use theor:
special option (untested):filter: include: - integration: powercalc or: - area: cellar - area: attic
Nice! That works😊 I tried to use OR but missed this structure. Thanks for helping out. Eric
@thomasloven Maybe a nice idea to include the two examples how to use OR in the readme. Thanks for the great card!!! Eric
According to the documentation if I specify multiple filters the card should use and between them so
And
Should be the same thing? But the first code uses or instead of and?
Is the documentation wrong or am I doing something wrong?