Conditions not working for Virtual Switches?

I've created the following condition

The goal is to have an audible beep whenever there's motion in the Sala, but only when the following virtual switch is turned ON

but upon testing, on both cases where switch ON or OFF, the action runs (siren beeps me)

What gives?

Manage conditions is just that, it is where you create and manage your conditions. You then need to employ those conditions in the rule, either as a required expression or as conditional statements in your actions.

For your use case I suggest required expression = virtual switch on.

Wow this is such a confusing and unintuitive design choice by HE.. I believe conditions should be set at the actions level "IF THIS then DO THAT" rather than suppressing at the TRIGGER...

When the sensor is TRIGGERED it must be allowed to be triggered (it's true state) and the condition whether to do something about it or not should come after........ atleast that's how i see it.

PS
So what then is the reason or use for having MANAGE CONDITIONS at the actions level?
I deleted my managed condition and just used the required expression (aka condition) thing and now it works as i expect it - though my OCD is kicking me as this feels icky and unintuitive

This is exactly how conditional actions work. The suggestion above of using a required expression is one way to avoid needing to do this that would also work for your particular use case (and save a bit of clicking).

This allows you to view and edit conditions that you are already using, or to pre-create ones you want to use later. When creating a conditional action, wait for expression, or in other places you can use a condition, you'll see existing conditions as available options. This also allows you to use the same condition in multiple places, and changing it here will change it everywhere.

This box is a common point of confusion, however. It does not do anything on its own, as you now know. Some wording was recently added to the UI to suggest this, but it's also clear in the docs. I'd suggest reading them for Rule Machine; it's a large and complex app, and it might save from clicking and guessing. :slight_smile:

4 Likes

alright.. i'm starting to get all that, I read the whole doc page re Rule Machine, but I'm still really confused.

If i don't want to use required expression, but just simple condition, and If I want to use a pre-set condition created in my Manage Conditions box, that DOES NOT DO ANYTHING, how then can I then apply that condition to the action?

I simply want to do:
if vSwitch Detect Vibration = ON, then Beep Wink Siren

Furthermore, I want to apply the same condition to another Rule in the Rule Machine, but that prepared and shared condition is not available in the other Rule Machine

PS
A video explainer would really be useful in explaining this confusing little bugger

You have to use them in an expression/condition, for your use probably a conditonal action (IF THEN). This is done via the menus to add actions. This video is a bit old (Rule 4.x), but it's more or less the same aside from the fact that actions are now shown in tabular format and added with the "+" button at the bottom of the table. Could be helpful if you want to see a video:

Also, I'd recommend just creating conditons as you use them if you're just getting started. Ignore this box. Pre-creating them probably just adds complication, but once you see how it works, maybe you'll change your mind. (I normally don't, FWIW.)

1 Like

alright! I got it now!
What didn't make sense to me was how to attach the condition to the action but i totally missed this option in the ACTIONS list

Now it makes sense.. i really feel this UI could've been done better like perhaps have a checkmark beside the actions list that says "conditional" then when checked have a box for conditions appear..

Putting the CONDITIONAL ACTIONS in the list of actual ACTIONS is mad confusing.

Whew, but glad I got that sorted now. Thank you for the leads mate!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.