Rule Conditions Created When Creating Conditional Actions

Hello, new Hubitat user. Came from SmartThings for the last year and Homeseer for the last 15-20.

I have a Konnected alarm panel and am creating rules for arming/disarming. The Konnected integration with my Vista 20P uses a timed duration keyswitch which is sort of a toggle operation so I have to make sure the panel is disarmed before arming or armed before disarming otherwise I'll get the opposite of what I want (kind of like a garage door button)

anyway - I'm using a simple conditional action inside a rule machine rule to only send an ARM AWAY command to the panel if it is currently disarmed (there's a contact switch that shows the armed/disarmed status of the panel)

basically: IF panel is disarmed THEN arm it in away mode

It looks like when I create these simple conditional actions, it also creates a condition for the rule itself.

My question is - Do I need these RULE conditions? or are the simple conditional actions on their own sufficient and I can delete the rule conditions?

hope that makes sense!

TIA
Dan

In typical forum post fashion, I think I may have answered my own question right after I posted.

I did some "cleanup" of rule conditions in my rules with conditional actions and it seems to have broken the conditional actions.

So it seems these rule conditions are necessary... but what about duplicates? For example, if I create a rule with 2 conditional actions on the same object (for example, I want to arm my alarm system after 1 minute then again after 10 minutes just in case it missed the first one) then it seems to create two duplicate rule conditions. Do I need both of them?

If I'm reading your question correctly, in the bottom panel you will have your defined conditions.
image
These are then used in your actions.
image
For the actions to be evaluated you need a trigger.
image
What you can also do is when you want to change a condition in your rule you can just change the condition and it will automatically change it in your rule.
You do not have to define the conditions in the bottom box first. You can go straight to the actions and what ever you use will be defined in the bottom box automatically.
Personally I never define actions in the bottom box first. I just write the rule and they appear in the manage conditions box.
Hope this all makes sense.

No. But don't worry about it. They don't actually do anything unless they are used in an action.
It is nice to clear them up though but be careful as you may delete the one that is actually being used.

Hi, thanks for the help - I think your screenshots look like what I'm getting at. Looks like I can copy/paste snips directly into here, nice!

If I create a conditional action, it automatically creates a rule condition. If I create multiple conditional actions but then I delete them, it doesn't seem to clean up the rule conditions. (which is fine) but yes, looks like, as you said, if I go and clean up any of the rule conditions that are actively used by the conditional action, it breaks the conditional action.

I think I'm set... seems to make sense now that I know how it works.

1 Like

OK, I think I'm back to being confused :smiley:

so... if using a conditional action in a rule creates a rule condition, does that mean all the other actions in the rule are subject to the rule condition?

For example, I have a rule ("Arrival") with a conditional action to check the status of the alarm before disarming it. That creates a rule condition for the "Arrival" rule that contains other actions unrelated to the alarm. One of those is closing the garage door 10 minutes after I get home.

Does the conditional action rule condition also apply to the garage door close action which has a 10 minute delay on it? Because 10 minutes later, the condition (alarm armed) will be false and if it evaluates it then, it would not close the garage door.

Everything worked as expected except the delayed garage door close. I don't see a scheduled action for it) and I'm wondering if that's because of the above?

Maybe I should just go back to having dedicated rules for ARM STAY, ARM AWAY and DISARM with associated virtual buttons for each and just push those buttons from my "Arrive" and "Depart" rules. This seems to be getting a bit complex :confused:

Personally I ignore the manage or create conditions.
Let's just say it doesn't exist.
Now just write/define your rule conditions and actions.
So in my rule above I would
Define a simple conditional action
Switch off exit rule.
Then define an IF-THEN conditional action
etc.
etc.
Whatever eventually appears in the "Manage or Create Conditions" box, appears. I can use this to amend my rule which is great if you use an action multiple times in a rule.

So I guess I'm saying, just write it in the "Select Actions to Run" box. :slight_smile:

BTW. Post a screenshot of your rule. People on this forum are great and giving advice on how to get the best out of what you are trying to achieve.

No. You're misunderstanding the Create and Manage Conditions section. This section is a place where all of your Conditions live and has two purposes. One purpose is so that you can edit a Condition; e.g. you want to change temp > 10 to temp > 15. You can edit that there, and where that particular Condition is used it will use the changed condition. The second purpose is for when you create a complex set of Conditions. When you go to add a new Condition to a complex logic equation, one of the choices is to use one of your existing Conditions; that would be any Condition in the Create and Manage section. Or, you can create a new Condition right there. If you do that, the new Condition will also end up in the Create and Manage section.

That section is just the collection of all of your various Conditions. In and of itself it does nothing. You can have Conditions there that are not even used in and action.

thanks, again. I switched everything over to using buttons and separate rules for arming/disarming. So now, I have an rule for each alarm action (arm away, stay, disarm) and a virtual button for each. This seems to work well and simplifies things when creating my daily routines so I don't have to think about the logic within each daily routine, I just push the arm away, arm stay or disarm buttons.

For example, my "Arrival" rule, pushes the "Disarm" button which calls the "Disarm" rule which only sends a keyswitch to the alarm panel if it is currently armed.

It's a few more buttons and rules but it centralizes and compartmentalizes the alarm logic into 3 different re-usable components.

ahhhh..... ok that makes sense now. So it's just a bucket of conditions - NOT conditions for the rule. OK, thank you.

1 Like

Yes. And, so you aren't thrown off by it, every time you create a Trigger, it automatically creates a Condition in that section that corresponds to the trigger. That's for convenience only, in case you want to test something about the trigger event itself. This is particularly handy if you used *changed* in a Trigger, because odds are you will want to test how it changed in your actions. You would edit that automatically created Condition for whatever test you needed.

1 Like