I am trying to delete a bad line in a rule. I apparently screwed it up and now I can't seem to edit it or delete it. I did not use the browser back button (that I recall). Is there some way to delete the bad line? Or am I stuck with retyping the whole rule in again?
The only option RM gives me is "Done with actions"
Delete the offending line(s) - you can't edit these- and then add them back.
rocketwiz et al,
Yes, I agree that is what I would like to do ... but my only option on this window is as shown below. So I don't seem to be able to do anything at all ... including "delete." From this "editing action window", I click 1) Done with Actions then 2) Done and then 3) select the rule again and 4) edit actions ... and RM returns to the same screen. I need to find a method to "break the loop."
When you click on the actions box in the main rule body the various options should appear eg
Can you not get to this window?
In a situation like this, it is sometimes easier to just re-create the rule from scratch. Otherwise, you might end-up spending more time trying to fix it than would otherwise be required…
I have had this happen to me and I never found a way to fix it. Just had to start over.
I guess there is one option, if it was a not a new rule you just created. You can go back to a backup prior to editing.
If you have made other changes you could export it and then reload current config and import the previous version.
rocketwiz ... Re: "Can you not get to this window"
No ... that's the problem. Hubitat is "stuck in a loop."
Sebastian, terminal3, Concur ... I think that I'll have to re-enter it.
terminal3 ... that was also a good suggestion to use Hubitat backup.
Also, what I think that I need to do as "good practice" ... is copy and backup complex rules more often ... so then I could recover more easily.
I was hoping for an "XML edit" or something ... but I agree that's not likely.
Perhaps I will provide feedback on this "editing loop", however, from what I have read, it is already understood.
As a follow-up, I thought that I would try cloning the rule ... but the cloned rule had the same fatal error that I could not edit the line.
Hmmm ... then there is editing an exported JSON.
Maybe Ill just recreate the rule
Another good option, especially on complex rules, is to clone it before you start editing.
This is to be expected; it copies all of the app's internal data structures, including the likely undesired state variables that got you stuck on this page in the first place.
One thing that might help: if you go to the "main" page of the rule (as you'd land on if you open it from the Apps list), is there an Abort Action Editing button? That might help if it's there. It was added as a last-ditch effort to help with cases that sound a bit like this one, though it may not appear in all cases and might not help with everything. But besides the above ideas (re-creating the rule, restoring from backup, etc.), it's probably all there is.
If this is not a new rule and you were just editing today,
Download a backup
Restore yesterdays backup
Export the rule
Restore todays backup
Delete the bad rule and import yesterday copy.
bertabcd1234 - Unfortunately no "Abort" button for me! ... But I'll look for it in future ...
terminal3 - 'You say potato, I say pot-ah-to' Sorry I am still getting used to the Hubitat terms. When I said "copy" I should have said "clone". I already do some cloning and backing up, but development of this latest rule was going so well and so fast, I forgot. So now I get to do it again!