Suggestion on rule machine editing

It would be nice to be able to edit the expression here. Some times its seems like I can but on these conditions it looks like I have to rebuild them. I just want to tweak the timing here but I can't. I have to recreate and then delete the old one.

Delete the element you don’t want and then insert before the element it should go before. Sometimes that will be -End of expression-

1 Like

Not 'Delete', you need to 'Cut Action"

Then you will get a 'Paste Action Before' option

I was hoping for an edit since I just want to change the time on the condition.

You can see and edit all your conditions on the bottom of the same screen where you build your rule:

This will bring up the following screen where you can select which condition to edit:

1 Like

You guys are now talking about conditions. The question (I thought) was about editing expression elements.

1 Like

Yeah it does not allow an edit from what I see... You have to delete and re-add.

It looks like you are still in the “Edit Condition” screen, not the Manage or Create Condition one...

This is confusing at first - it took me many months to figure it out...

3 Likes

Thank you! See it now... despite it staring me in the face and me thinking I finally got this interface!

4 Likes

Trying to edit an IF statement, I keep getting this:


I have been trying to change the "in" back to "is" and it just keeps getting worse as the first "in" wasn't there when I started, but now I have two "in"'s.
What's going on?

Editing is a real pain!

played around more and found that if there is only one condition, the IF statement is "IS" but two or more it turns into "IN".
Strange!

The mode is IN a set of possible values. It can't be IS a multiplicity. It can be IS Evening. That's just the language used.

1 Like

Thanks. It was driving me NUTS as I was trying to edit the IF, and couldn't. I stumbled on the "is" vs. "IN" by accident. Makes some sense but having written a VERY little code (Visual Basic and C++), the "IN" got me.
Now that I know, I am sure I will remember now.

1 Like

I have been searching for SIMPLE instructions on how to define private/global variables, and have just gotten confused and frustrated.
This is probably NOT the thread to post this, but are there some basic, SIMPLE explanations and samples on how to define a variable and the naming conventions? KISS!
I am very new to Hubitat and even newer to rule machine, so the examples I have seen are more complex than need be for simple understanding.

On the main page of a rule you can define local variables. Click on New, and follow the prompts. For Global variables you do the same thing on the main page of Rule Machine.

In many contexts of actions, you can use a variable by entering %variable-name% where you would put in a value, like setting a dimmer to a level. In most contexts of triggers it is explicit where you can use a variable.

1 Like

One of my IF conditionals has several conditions in it (MODE in Evening 2000, Night 2100, sunset, 1600) and I want to edit the conditions (remove the 1600 condition), but haven't found a way to edit that IF conditional.
Is there a secret method to edit an already defined conditional?

On the Actions page, at the bottom, there is a section called Create and Manage Conditions. Those conditions of you IF action are there, and can be edited there.

1 Like

Got it! Thanks! I gave it a try and just what the doctor ordered!