core: Switching light groups of light groups very slow since recent updates

The problem

Since recent updates, HAss reacts extremely slow when switching light groups that contain other light groups.
All of my lights (Ikea Tradfri) are integrated via deconz (ConBee II) and are working as usual with minimal delays.
I have defined light groups via configuration.yaml that contain other groups (see snippet for original config):

  • Group “All”
    • Group “Kitchen”
      • Lamp 1
      • Lamp 2
    • Group “Living Room”
      • Lamp n
      • Lamp n+1

Switching the daughter groups (e.g. Kitchen) works instantaneous. Switching the “All” group used to be instantaneus as well, but now takes 5 - 15 seconds. It doesn’t matter if the group is triggered by the UI or a remote, it will always take a long time.
On top of that, I have also noticed that the UI is sluggish in updating the status of the “All” group when toggling it.
This is not the case for daughter groups - these update instantly.

Observed behaviour:

  1. Toggle Group “All”
  2. Observe Toggle in dashboard switching
  3. 5-15 seconds later, all the lamps in the dashboard are updated and are actuated (turned on or off)

Steps to debug:

  • Limit group membership of “All” to 1 daughter group (same problem with any daughter group)
  • Replace daughter groups with the lamps that are contained in daughter groups

When removing the daughter groups out of the “All” group and adding all the lamps that are contained in the daughter groups directly into the “All” group, everything works instantaneously (basically, with the same speed like it was in 2021.12.10 with the original group setup)

What version of Home Assistant Core has the issue?

core-2022.2.2

What was the last working version of Home Assistant Core?

core-2021.12.10

What type of installation are you running?

Home Assistant Container

Integration causing the issue

deconz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/deconz/

Diagnostics information

No response

Example YAML snippet

# configuration.yaml


# Custom light groups
light:
    - platform: group
      name: Living Room (L)
      entities:
        - light.computer_lamp
        - light.couchlampe
    - platform: group
      name: Kitchen (L)
      entities:
          - light.led_bar_60cm
          - light.coffe_counter
    - platform: group
      name: All (L)
      entities:
          - light.living_room_l
          - light.kitchen_l

Anything in the logs that might be useful for us?

No response

Additional information

Resolving the daughter groups and adding the very same lights directly into the “All” group leads to instant switching and UI updating, basically the same speed as HAss had before the latest updates.
This is the temporary “fixed” config I’m running now:

# Custom light groups
light:
    - platform: group
      name: Living Room (L)
      entities:
        - light.computer_lamp
        - light.couchlampe
    - platform: group
      name: Kitchen (L)
      entities:
          - light.led_bar_60cm
          - light.coffe_counter
    - platform: group
      name: All (L)
      entities:
          # Kitchen
          - light.led_bar_60cm
          - light.coffe_counter
          # Living Room
          - light.computer_lamp
          - light.couchlampe

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 21 (5 by maintainers)

Most upvoted comments

It’s not part of 2.5. It will be part of 2.6

Is anyone aware, how to get a core topic owner to this problem and opened issues, as there are now a lot of them and none of them has a code owner assigned to have a look.

Esp. as it is related to more groups, at least light groups and cover groups and more issues will follow, if more user will update.