I'm rather confused by your and @Automatican 's comments and @bertabcd1234 's replies.
This thread (and @thebearmay 's amazing effort) has been all about figuring out which RULES reference which other RULES.
In your last comment, you were talking about DEVICES--a wholly unrelated matter.
And, as others have mentioned, there are different things going on with swapping devices. When pairing/creating a new device, there are some "replace device" options. Then, totally separately, when cloning, etc. a rule, you can swap devices within the new rule.
When adding a new device, you can't do the swap, afaik, if either device has parent/children--which makes some sense, because there are some internal things that will get all hosed up if you rip a child out from underneath a parent.
However, when it comes to replacing Devices, there are some decent tools for manually doing that. Specifically, the list of places where the device is being used in the device information itself:
If you need to swap out a device that's in a parent/child relationship, I'd recommend:
- Add the new device as a new device
- Open the OLD devices (parent and children). Go into the "In Use By" page, open up all of the listed rules, then manually change the old devices to the new ones.
It's a bit of a PITA, but that should do the trick.
The issue in this thread, with what RULES are "in use by" what RULES--is there has never been anything even close to this before. So, if you are (say) needing to replace a RM4 ("legacy") rule with an RM5 rule to take advantage of some new feature, it was insanely difficult to do--you literally had to open each rule, each app, etc. and read each line to see if anything referenced the old rule, then you had to change it.
If you missed something, you'd have "broken" rules that could fail unexpectedly.