How do I edit an existing action in Rule Machine

I'm playing around with adding rules and would like to easily be able to tweak an existing action. I have not been able to figure out how to change an already added action, only add a second action.

I read back in 2017 you had to delete the whole rule and start over but I also read that the edit option was to be added in a newer 2017 release. I'm possibly just blind I suppose but I can't figure it out.

I note in help it says you can edit them as well

Actions can be edited
The UI provides the facility to edit or delete any action you have defined, giving you complete control over your list of actions.

Assuming you've created a rule using the latest version, Rule 4.0 (released around July 2019) or Rule 3.0 (released a few months before that)--which should apply to you if you're on anything even vaguely resembling a recent hub firmware version and create a brand new rule (your old rules will remain their previous versions if you have older rules from before this all)--then this feature is available to you. Here's how to get there:

  1. Click into your "Select Actions to Run" section, just as you would to add a new action (or removing existing ones, etc.).

  2. Towards the bottom, you should see an "Edit Action" drop-down. Click (or tap) it, then choose the action you want to modify. Here's a screenshot:

image

Note that this only lets you edit settings for that action, not replace it with an entirely different kind of action. (For example, if you're editing a "Turn off switch" kind of action, it will let you choose different switches to turn off but won't let you change that action into a totally different action, like one that will turn on a switch, send a notification, change your location mode, or anything else.) To do that, you should use "Insert Action Before" (directly to left of "Edit Action" in my screenshot) to put the new action where you want it, then use the "Delete Actions" dropdown (to the right of "Edit Action" in my screenshot) to remove the one you no longer want.

If you don't see this, it may be helpful to share a screenshot of what you're seeing. In your Apps list, you could also verify that your rule is either Rule-3.0 or Rule-4.0 (in list view, you can see this to the right of the rule), but it should also be apparent from a screenshot.

1 Like

Thanks much, appreciate the detailed explanation.

When I choose "Select Actions to Run" I only see a "Select Action Type to Insert," but no "Edit Action." See below. I'm running 5.0. I don't even see an option to delete the action entirely, leaving the only path forward to delete everthing. Am I missing something?

UPDATE: For people who are following my footsteps, AFTER YOU CHOOSE INSERT—even though you don't want to insert anything—you get the edit option.

You don't happen to have screen reader accessibility setting on, do you? That will mess with the menus. Go to Settings tab, top bar above Hub Details and Hub Login Security and just to the right of Advanced slider.

I think what happened in your case is that you chose "Insert action before" on the previous screen (the one before the one in your screenshot), so now you're on the page where you have to choose the type of action to add. Rule Machine remembers this state and will show it to you even if you go out of the rule and back in, so this could have even happened back when you created the rule (if it's an old one) and you've long forgotten that you might have done that; you'll have to choose some kind of action, even if it's one you don't want, and then hit "Cancel this action" before you actually add it (or just add it and then delete it after the fact--perhaps that was the workaround you discovered).

Normally, you'll see the options I posted in that screenshot, which now look more like:

No, "Enable screen reading accessibility" is switched off.

Thanks. That sounds right. The edit option is there on entering the actions screen now. Having spent more time with the rules engine, I'm starting to understand it and— Gasp — kind of like it.

On a tangent, I want to say thanks to everyone who put this and everything together. I know it is years of person-hours to get this to where it is. I hope Hubitat is profitable. The number of smart home automation solutions seems to me to be shrinking, with lots of different players leaving the market.