FFS seriously?
Really looking forward to a day with this system when I don't get an error doing something simple.
FFS seriously?
Really looking forward to a day with this system when I don't get an error doing something simple.
You didn't really say what you did, just posted a couple screenshots (none of which were the app as originally configured) and said that a device was "referenced," so I tried a couple things to see if I could get this to happen to me.
First, I created a new Button Controller 3.0 child with a virtual button device as "Select Button Device" and set up some actions. Then I deleted that button device. I was able to go back into the Button Controller child app with no errors; as expected, the button device was just missing. If I chose a new one, everything else filled back in.
Since that worked, I did something similar but referenced a device in the actions that I then deleted. In this case, I get the same error as above. I only get this with "standalone" Button Controller 3.0, not the "Button Device" trigger in RM that uses the Button Controller UI. RM will give me "**broken action**" here.
As a workaround, if you want to delete devices without first removing them from automations they belong to (probably the ideal state, but I confess to not always doing that myself), using a "Button Device" trigger type in RM will effectively give you the BC 3.0 UI (not a "Button" trigger, though you can do effectively the same or more with that and just use the regular RM UI). Long-term, if BC 3.0 sticks around as-is, it would be nice if it either gracefully removed the device like most automations do or put in the same "broken action" hint that RM does.
You undoubtedly have way more patience than I. I absolutely would expect a system to gracefully tidy itself up when a device is removed, without such an error. That is very basic and beyond "nice" in my opinion.
Most apps do, but I'm guessing RM and BC 3.0 (largely based on the RM 3.0 rewrite) are a bit special due to the way that so many of the things they display (especially things like conditionals in RM) depend on devices you've selected--probably just an edge case in the code that didn't come up in testing.
I agree they shoud gracefully recover, and I'm sure staff would agree too. I'm guessing @bravenel wrote BC 3.0, so hopefully he'll be able to fix this. In the meantime, if you do this a lot, using RM with "Button Device" gives you effectively the same UI (after you set up the trigger), plus a bit more power, and avoids this problem.
I will probably move over to RM4.0 and stop using button controller. Nevertheless, I believe this type of basic error (which I would definitely not consider an edge case at all) really should not be happening. If it comes across as an irritated rant, I've had a week of issues with this product so I'm rather tired of it.
I agree with you, that it shouldn't happen. Care to provide more information so I can look into it? I'd need to see what it looked like before you removed the device.
Update: Further to this, since both of these errors involved .replace()
I have protected all such references in Rule 4.0, and will do so as well in Rule 3.0 and Button Controller 3.0. These fixes, to all three apps, will be in the next release,.
Not the original poster and I've since deleted the child app that caused the problem, but if you still need to know this: all I had to do was remove any device referenced in the "actions" for the button in child app (not the button device itself). I used a virtual device to make it easier, something like "Actions for button 1 pushed: set Virtual Test Dimmer to 100%," then I deleted Virtual Test Dimmer.
I can provide a screenshot when I'm home again if that makes it clearer. Otherwise, sounds like you're at least on top of catching the error so the whole app doesn't fail. Thanks to you for this and the original poster for finding the error!