home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.42k forks source link

Switching light groups of light groups very slow since recent updates #65885

Closed Maddosaurus closed 2 years ago

Maddosaurus commented 2 years ago

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):

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:

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
probot-home-assistant[bot] commented 2 years ago

deconz documentation deconz source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (deconz) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Maddosaurus commented 2 years ago

Seeing the automation flagging this as a deconz issue:
I would suspect this not to be a deconz issue, but more of a core issue, as the lightgroups seem to be the culprit.
I filled out deconz merely because this is how I control the lamps in these groups 😄

Talismanian commented 2 years ago

Hi everyone, I have replicated this issue with only LIFX bulbs. After updating to 2022.2.2, the light group—containing both individual bulbs and other light groups—exhibited the same behaviour.

The individual bulbs changed immediately, but the groups had a ~10 second delay.

Rolling back to 2021.12.10 is my current workaround as I would not like to alter this config.

reaper7 commented 2 years ago

I have exactly the same problem but with esphome lights, zigbee light in a group reacts immediately but esphome lights (as well as the whole group) with ~5-10sec delay

sw

emufan commented 2 years ago

There are a lot of issues already opened.

Maddosaurus commented 2 years ago

Sorry, for causing chaos. I was trying to find similar issues but didn't seem to have looked closely enough. I'd be fine to close this off as a duplicate to #65119 as this looks quite the same.

BiasF commented 2 years ago

Hi,

same Issue.... I have only zigbe2mqtt light. If I toggle a light group all direct member are turned on imeditaley and all lights which are member of another group which is part of the group have a delay from about 15 seconds.

siemon-geeroms commented 2 years ago

Hi, I'm experiencing the same issue, I think it's due to PR #63477

probot-home-assistant[bot] commented 2 years ago

group documentation group source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (group) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

lbouriez commented 2 years ago

Same issue on my side since the last release

Andrewpaps commented 2 years ago

Yep, same issue on my end making scripts & scenes extremely slow to react.

casual-programmer commented 2 years ago

I'm having the same problem with Philips WiZ bulbs, started with 2022.2 and continuing through 2022.2.3. The problem occurs with any action that is taken on a nested light group. There is a 10 second delay between the trigger and action, and then the action slowly makes its way through each light group within the nested light group.

emufan commented 2 years ago

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.

lbouriez commented 2 years ago

Maybe @frenck can help :)

torbjorn2000 commented 2 years ago

I got the same issue, and it is very easy to replicate.

This is the group config:

light:
  - platform: group
    name: test_group_1
    entities:
      - light.test_group_2
  - platform: group
    name: test_group_2
    entities:
      - light.bedroom_light_bulb

Switching light.test_group_2 is immediate while light.test_group_1 takes 10 seconds.

jasondefuria commented 2 years ago

I have the same issues presented here. It seems like the nested groups are the problem. @torbjorn2000 provides an excellent test case to help debug why this is occurring.

tomasbedrich commented 2 years ago

Confirming. I have mixture of Shelly, Zigbee2MQTT and Skydance lights. After manually flattening all the light groups, they react withing 1-2 seconds. With nested groups, it sometimes took 5-10s.

Nothing in logs unfortunately. The issue started in 2022.2.x.

mmkrysiak commented 2 years ago

Same issue on my side since. core-2022.2.5. It takes about a minute to turn off triple nested group of lights.

balloob commented 2 years ago

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