Button controller conditional trigger fail

Hi everyone,

I'm fiddling with conditional triggers, but found out that they don't work for my button controllers (hue button). Rule triggers as if the trigger was non-conditional.

Example:

These are my triggers:

The time trigger with a condition variable=true/false works great:

However, the button push/hold triggers fire the rule even if the conditions based on variable=true/false aren't met:

image

I cannot circumvent the issue by adding a condition "if button pushed/held" in rule's actions, because such a condition isn't available in actions. It exists only in triggers (but doesn't work).

Please advise
Thank you
Matt

Let me see if I get this straight…

Of the triggers you setup, the first 3 which are time based are working fine. However, the last two which are based on a button press activate regardless of whether or not their related conditions are true or false.

What I would do to see if this is a bug is to copy the rule and keep only one of the non-working trigger, to see if the behaviour works correctly or not. I suspect that the two opposing triggers on the same button (though with two different actions) could be conflicting with each other.

If you need the rule to work while it is being debugged, another option would be to separate those button rules into their own copies of the rule. The Only If could be kept as is, or an even better option wold be to move that condition into a « required expression », one for each of the copies of the rules.

1 Like

I just tested this and confirm that I can reproduce:


When only one of the triggers is in place, then the rule works as expected, but with the two triggers, it runs regardless of the value of the boolean variable.

I seem to recall seeing something similar in the past, so this is likely a known issue. Tagging @bravenel

1 Like

Thanks to your clever insight, Sebastien, I was able to implement a workaround by spliting the push/hold triggers into two separate rules, which worked well.

Then I realized I could simply incorporate each of those rules' actions straight into my button controllers app, instead of rule machine. I would simply have more than one action performed by a push or hold of a button.

Perhaps my logic was wrong all along. I wanted to keep all actions (be it automatic due to time of day, or manual due to button push) in one rule in rule machine app.

Maybe I should have, from the start, kept the automatic actions in rule machine app and manual button actions in button controllers app.

I appreciate the help!
Cheers,
Matt

1 Like