How to clear the entire clipboard?

My clipboard list fills up with things I don't need anymore and becomes unreadable as many lines begin with the same name...
I know how to clear the clipboard inside a rule, but I can't find a way to clear the clipboard completely, so that it is empty again.

Any hints ?

Clear Clipboard erases the entire clipboard. What are you doing to "fill" it up? Each new Cut or Copy erases what was there before.

Maybe I was not clear enough. I'm talking about this popup menu:

I found a way to remove lines, but it's not funny. I have to go back to all these rules and clear the clipboard.

Maybe I'm wrong but does that mean that I have to do the following to avoid that this popup fills up ver the time:

  1. Copy the lines in rule A
  2. Go to rule B and import the clipboard from rule A
  3. Insert the code before ...
  4. Clear the clipboard in rule B
  5. Go back to rule A and clear the clipboard in rule A

A global method seems needed. It could be a line at the end of this popup menu like ** Clear all clipboards ** or at least a button in rule machine to clear all the clipboards at once.


Though my list is much, much shorter, I also think there could be a benefit to an option to clear all the rules’ clipboards - if the effort to implement is not too much… I keep forgetting to clear it on rules when I use the cut/copy function…

Of course it's doable, but talk about risk of unintended outcomes...

Caught between a rock and a hard place with this. Either manage your clipboards, or not have the ability to import them between rules. How would you know that you don't want any of them?

Personally, I find that once I pasted the content of the clipboard, I rarely need it again. So for me, having the option to decide to delete all clipboards would work. (Also, most of my complexe rules are all written now, so I mostly maintain…)

That said, I really, really like the feature to be able to import a clipboard in other apps. If the choice would be to keep the functionality as is or lose the ability to paste in other apps, I would chose to keep as is.

Perhaps a solution is to put an explicit "Export this clipboard" toggle on each rule when it has a clipboard. It would seem as though exporting/importing a clipboard is a relatively rare thing to do, so that would lessen the size of the list available for import.


That would be a nice option!

I don’t understand what you mean with this. A computer has a clipboard to copy data from one place to another just like from one rule to another. You don’t need an import from.

For me a clipboard should simply keep one copy of lines in rule A, that can be pasted to rule B,C,… and that should be overwritten by the next copy.

In practice, everything can continue to work as it actually does with just a clean all for the clipboard function.

Your idea with a checkbox can work if we consider that the clipboard works as rule snippet manager.

Or am I completely lost and wrong ?

Another thing, I think is a bug. Lines with a condition like ‘IF DEVICE X ON… ‘ always end up with IF ( FALSE) .. without any device.

Does your computer clipboard get cleared when you paste it somewhere? This is not the expected behavior of a clipboard, so people would be quite surprised if that's how it worked.

The point is that copy/paste within a rule is more common that copy/paste from one rule to another. The latter is what gave rise to your OP complaint, because the list of possible rule clipboards to import became very long. By making the notion that you want to allow another rule to import and paste the clipboard of a rule explicit, instead of implicit, the length of that list becomes more manageable. There will still be a need to deal with -- manage the clipboards of rules that are selected for inter-rule copying.

There is no perfect solution for this. We can't very well erase clipboards without that being a problem for some users. Evidently, allowing all clipboards to be imported created a problem for you. So, what to do. Adding a toggle is a partial solution.


That's not what I wanted to say. It gets overwritten 'System Wide' by the next copy action - not paste.

To make things simple. What I do actually is:

  • Doing a copy of lines
  • Opening a new rule or one to modify
  • Do an import and paste
  • Clear the clipboard
  • Modify pasted lines
  • return to the rule from where I imported the clipboard and clear the clipboard

To many steps to have a clean list op clipboards...

So, what about a button 'Manage Clipboards' in Rule Machine. This button could go to a page with a list of all the clipboards, just like the popup-menu but larger so that you can identify long names, with a checkbox at the left of every line. The user can check the clipboards he wants to get rid off and click on a button delete... Not a good idea ?

Rule Machine, the parent app, has no involvement with clipboards, and it is best to keep it out of these sorts of things. What we have done is make the exportation of clipboards, and hence them showing up in the drop down for other rules, something that does not happen by default, only by direct action. See below. Unless the Export Clipboard toggle is turned on, the clipboard will not be visible in other rules.

One way or another, you have to manage a clipboard that is made available to other rules.


Ok, I see I have to live with it.
Anyway Hubitat is for geeks :wink:

I had this happen several times yesterday. Mostly with IF statements including more than one condition using AND. The UI seemed to have "deleted" several instances of the same condition from multiple IF statements. I also noted that several conditions were duplicated in the "condition manager" area of the rule, even though I had created all of them ahead of time and believe I selected the same instance each time I used it. Not sure if this is related.