Need Help Creating a Complex Rule

I'm trying to get my head around this but can't seem to find what I'm looking for. For my test, I've created two virtual switches and a virtual contact sensor so I can play with them. I now want to create a rule where it sends a notification to my phone if either switch is turned on but only if the contact sensor is open. However, it is sending me the notification seemingly regardless of the state of the contact sensor. I scrapbooked together some screenshot parts to illustrate my rule. It looks like this:


What am I missing here? How do I get it to send the notification if either switch is turned on but only if the contact sensor is open?

trigger
switch a switch b any is on

if switch as or b is on
and contact sensor is open
then
send message
end if

2 Likes

Just need a conditional action

You made the condition but I dont think you're using it.

Make your action be a conditional one using that condition you created.

1 Like

This threw me at first as well when I started. The conditions section at the bottom is simply a bank of the conditions you have created in the rule so far, available for you to use, they are not applied unless you reference then in the actions like @april.brandt showed.

It should look kinda like this when you're done, except instead of "Smoke Detector : Smoke = FALSE" yours should be your contact sensor:

So your action should not by of type: SEND ALERT

Your action should be type: Conditional Action --> Simple Conditional Action

Then select your condition and the action.

1 Like

Thanks everybody. I just misunderstood the interface. Conditional actions were the key. I'm off and running again now.

1 Like