Visual cue when Basic Rules is broken because device removed

It would be nice in the Apps list for Basic Rules if there was a cue when a rule is broken because a device has been removed from Hubitat.

Steps to reproduce:

  1. Create Basic Rule for device (ie. when device senses motion send push notification)
  2. Go into Device screen (Devices > Device name)
  3. Remove Device button
  4. Go to Apps screen and find Basic Rule. No indication that it is broken.

I remember seeing this feature for a Rule in Rule Machine. It showed **Broken** in red text or similar next to the rule, making it obvious it required attention.

Update: My use case is that I am moving between houses so I have removed many devices but kept a dozen (crucial ones). I know I needed to clean up some unused App because of this, but it required opening each and every one to read through if there were missing devices in the App.

You're missing a step before this: when you remove the device, you'll see a list of apps using the device. :slight_smile: As it mentions there, you should remove the device from those apps before removing the device.

If you don't do that, have your Basic Rules actually been "broken"? I'd expect the device just to be removed from selections (since it no longer exists) with little else of consequence, though the above is still good advice. If you found a specific type of "action" that can break, that might be good to know.

Regarding the specific request, apps don't have a way to know a device was removed from underneath them until they are opened (or something executes in them), and even then not without some effort. IIRC, RM worked around this, per a user request, by adding something to the parent app that could call something on each child app (rule) to check. It is still not a real-time check. Whether something like this could work (or be worth the effort here), only Bruce could say.

2 Likes

Thanks for the reply. I'm aware the "proper" way would be to go into each and every app linked (as advised on the screen, and what I'll probably do next time if time permits. I was simply walking around with my smartphone physically removing devices then removing from Hubitat at the same time).

It would be nice if, like Rule Machine, obviously broken Basic Rules could show an indication if they attempt to execute and it fails, or if they're opened onscreen and they're broken. For example, an easier workaround would be to open the 50+ apps in new tabs and look for a **Broken** indication. Example below:

App before device removed:

App (obviously broken on page load) after device removed:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.