This object is in archive! 

Rule with multiple "OR" operators

Luca shared this question 8 years ago
Need Answer

Hi,

I'd like to create a rule with multiple "OR" operators.

E.g. at a given time, check every blind sensor status (I have 7 blinds), if one of them is "open" then send a single message.

At this moment, I achieve this result using a single IF for every single blind (see attachment), but I'd like to group all the checking cycle (E.G. IF blind 1 position > 15 OR blind 2 > 10 OR blind 3 > 12 THEN send message "one of your blinds is open")

How can achieve this?

Files: rule.jpg

Replies (1)

photo
1

With nested ORs! Or did I misunderstand your problem?


If it becomes too clumsy because the ORs stretch off the screen on the right, you can do the following:


set variable BlindsOpen = 0


if (blind1 open) or (blind2 open)

set variable BlindsOpen = 1

if (blind3 open) or (blind4 open)

set variable BlindsOpen = 1

etc


if (BlindsOpen)

SendMessage

Files: ORs.png
photo
1

Thank you David for your answer...

But I'm missing that point: how can I say "If blind1>0 OR blind2>0 then send message"?

I can use neated ors and add multiple sensors, but £'m not able to add the part ">0"

photo
1

Sure you can!

Files: ORs2.png
photo
2

Finally I find the way with nested ors!

Effectively, the rule becomes really too clumsy, so it's way better to use variables.


Thank you for your help!

photo
1

No problem

photo
1

David, no wonder why are you a pro user. Again thunbs up.

photo
2

Although this is a double post, i will not remove it :)


David, no wonder why are you a pro user. Again thunbs up.

photo
Leave a Comment
 
Attach a file