Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules with Multiple Conditions #2216

Closed
damooooooooooh opened this issue Oct 10, 2019 · 2 comments
Closed

Rules with Multiple Conditions #2216

damooooooooooh opened this issue Oct 10, 2019 · 2 comments

Comments

@damooooooooooh
Copy link

damooooooooooh commented Oct 10, 2019

I want to create a rule that sets a Day Alarm. I have a virtual On/Off to "turn on" the alarm and I want to create a rule as follows:

If (DayAlarmOnOffSwitch Is On) AND (DoorContact1 Is Open OR DoorContact2 Is Open OR DoorContact3 Is Open) Then
    Alarm1.Trigger()
End

I can't seem to do this, I can only create a rule with all conditions = AND or OR.
To achieve the above I have to use a combination of Rules, Virtual Switches and Pulse Switch adapter.

Example below
image

@mrstegeman
Copy link
Contributor

Duplicate of #2190

@mrstegeman mrstegeman marked this as a duplicate of #2190 Oct 10, 2019
@mrstegeman
Copy link
Contributor

What you want could be achieved by breaking your rule down into 3 simpler rules:

If (DayAlarmOnOffSwitch Is On AND DoorContact1 Is Open) Then
    Alarm1.Trigger()
End
If (DayAlarmOnOffSwitch Is On AND DoorContact2 Is Open) Then
    Alarm1.Trigger()
End
If (DayAlarmOnOffSwitch Is On AND DoorContact3 Is Open) Then
    Alarm1.Trigger()
End

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants