Remove from group when device is deleted

How to create:
Add 3 devices to a group - I selected a color bulb, a dimmable bulb and a switch.
Save group.
Apply group to a Room Lighting rule.
test.
Delete (remove) individual device - I deleted a dimmable bulb.
Review Group. Device is still listed. Refresh (on screen button) clears device from group.
edit ** in case it has impact, here are the group settings in use:

Rules handles deleted device well - but groups do not. I would like to see a group automagically stay correct.

1 Like

If the screen was open when you deleted the device, a screen refresh is required to update the data displayed. Hubitat does not automatically refresh screens except when an attribute changes. This includes preferences and state variables on the device's edit page.

1 Like

thank you - Mr Kasa I believe?

I had no screens open, except for the device page I pushed 'Remove' on. I took a break, came back and was looking in logs and saw the error in logs. I opened the Group Device saw nothing wrong, then opened the app Groups and found the culprit?
The steps above recreate the error, hence the 'feature request'.

1 Like

I believe the "Groups" app is depreciated in favor of Room Lighting. They made it available again due to some edge cases that worked better in the Groups app.

Point being, I doubt there is going to further development on it.

Not sure thats the case, @jtp10181 - I thought M&M (motion and mode lighting) was the app RL was supposed to be an upgrade for - regardless. Forced structure never was a mainstay of HE. Along time ago I felt there was two paths that needed to be built into the foundation - groups and teams. To me, groups are devices ganged together, like all the switches in your house for example. a team would be a set of identical devices in one 'object' - say 3 bulbs in a bathroom light. they all would share identical properties etc. Anyways, I think bravenel used the term shitcan at that time and I went to the darkside with HE. I really don't think you can replace groups with an app.

1 Like

It was all of the above.

But I agree with @jtp10181 that it’s unlikely to be near the front of the line for feature upgrades.

Wouldn't the prompt that appears when removing a device, reminding you to go through each of the apps a device is used by, be the solution here? I.e. you should have gone through and tidied up or in some way dealt with the group membership before removing the device?

Don't get me wrong, I get that it would be more convenient and Groups is likely on of those apps where it could possibly be handled automatically.

3 Likes

Interesting @sburke781 . As soon as you pointed that out - I realized I hadn't seen the warning prompt!
So .. I went back and tried to recreate the steps I did - I have been working on modding a driver and working with another dev on a driver - and I had set this driver to 'device', re-added it multiple times. Somewhere in all this, the device 'disconnected' itself from items in 'In Use By' which is the trigger to the long message in the warning you think I should have seen.
I just simulated it again, adding it to a couple groups,
An attempt to remove gave the expected long form warning:
image
Then I toggled the device, the driver, used a private driver ... and viola. Broke.


Note nothing in the warning BUT there it is in Lights Group! so. some form of a bug probably self - induced - thats all the effort I'm willing to put into this.
-
edit * and I still feel if Rules can be aware of self - inflicted wounds, why not Groups?

1 Like

Groups was deprecated, and is no longer under active development. One of the reasons it was deprecated was that dealing with issues such as this one would take a major rewrite of the app. That rewrite was undertaken, and is called Room Lighting.

Room Lighting can import and convert any Group app to an equivalent Room Lights instance. Room Lights supports groups, in very much the same way that Groups does. And, Room Lights handles removed devices the way you are requesting they be handled.

4 Likes

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