2 rules off same trigger

Hi all
Can you have multiple rules run off the same trigger? I have some actions I need to do but only 1 of them requires conditions, and it seems rule machine can only have conditions for all actions (or please point me to where I'm going wrong).
Thanks
Alan

Where does it say this. RM is essentially a script so just put the ones you want to run without a condition 1st then add the condition code under it.

You can have a rule call and run the actions of another rule.

You can but in the OPs case there is no point in that. Just put it in one rule but leave the stuff without a condition out of a condition statement.

Agreed, I was just answering the first part of his question. Options are always good.

I think it was a question of can you have 2 separate rules fire at the same time by the same trigger and you can. But best practice is to avoid it if you can, I don't think 2 rules will make a difference but if you start adding more and more you may see a slower response. Where as in the same rule you wouldn't.

I must be understanding this wrong. The "manage conditions" button is under a list of all my actions. If I go into an action, it's just to edit the action and not set conditions specific for that action. And likewise, if I set a condition, I don't see where you can specify to only apply to some actions.
How do I get to see the code and not the simplistic user interface? That would be a lot better.
Thanks

What are you actually trying to do? If you state what you want we may be able to assist you better?

1 Like

The manage conditions is only for your pre defined conditions you have already set, you just want to add a action.

Example

Trigger

Mode to home

Actions

Disarm home
Unlock door

(Etc the above will fire no matter what as soon as the mode changes to home as no condition are encapsulated before it)

IF(light levels are X) THEN
Turn on lights X and Y
Turn on speaker
END IF

(These above will only fire if the condition is true)

Flash light z

(Again the above would fire no matter what as it's not got a condition)

1 Like

What I basically want is:

If button pressed THEN
Turn off lights x and y
Turn plug x off
IF sensor 1 is closed AND front door locked THEN
Flash light z green
ELSE
Flash light z red
Endif
Endif

If I could only see the coding I could sort myself out,but I don't know where to find that. All I get are the buttons to choose

Do you want this to be one rule or two? For the condition you need to specify the button number. If it only has one button then the button number will be one.
Here is the button code. I can add the other logic to this if you want just one rule.

Why don't I see the coding view like you? If you look at the attached pic, mine doesn't show me any logic statements, just what is happening.

Are you selecting 'conditional actions' under select actions to run and then you will get a drop down menu on the right.

1 Like

you need to select button "device" as the trigger.

Maybe I'm not understanding what they're asking. He has the button as the trigger. I think he needs help setting up the conditional logic.

yes that's what i think @AlanB think's .

@AlanB see example (i can't flash)
edit: missed the else

just a note there is no "THEN" for this the button press is the event / trigger that will fire the rule.

Won't 'toggle color' turn the light off if it's already on? Doesn't he want to 'set color' with a delay to get the flash effect?

was just giving a example i don't have any devices that can flash, same as i don't have any locks hence i used mode instead.

2 Likes

Thanks all. I think I'm just missing the conditional button. I'm not home now but will check later and yell if I'm still not coming right.
Thanks for all the help