Make Unavailable or Offline Lights and Switches not effect Status of Light Groups

I use two groups to help loop my automations regarding motion activated lights. I use the first group as an “all on check” that had the all entities option activated and contains all the lights in that room that are supposed to be turned on when motion is detected. Because of various issues every now and then there will be a bulb or two that didn’t do what it was supposed to whether thats because of interference or RAM issues. This loop with the group then sends it back to repeat the subflow that makes those entities retry and then it verifies through that group again and cycles through till every bulb is set to on and then the group stops the loop. If I need to temporarily unplug something, this makes my loop continue endlessly because now that all entities enabled group will never sense as “on” since one of the bulbs is now offlne and not technically “on”. It would be great if the behind the scenes mechanics of the light and switches group could be smart enough to exclude that offline bulb from the stats of the group so it only used the status of the online bulbs and switches to calculate the group as on or off

The same can be said for the opposite. I have a second group with the all entities option disabled that checks to make sure all the lights in the group are off after motion is no longer senced and if any of the bulbs for any reason did not turn off it sends it back through the loop again. Same for the mechanics here. If i need to unplug a device it creates another infinite loop It would be great if the behind the scenes of the groups could be smart enough to exclude that offline bulb from the stats of the group so it only used the status of the online bulbs and switches to calculate the group as on or off