Skip to content

Light group not working #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lociii opened this issue Jul 21, 2020 · 1 comment
Closed

Light group not working #27

lociii opened this issue Jul 21, 2020 · 1 comment

Comments

@lociii
Copy link

lociii commented Jul 21, 2020

Key Value
host_os HassOS 4.11
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7l
python_version 3.7.7
supervisor 229
version 0.112.4

zigpy-znp installed from source
git+https://github.com/zha-ng/zigpy-znp.git@dev#zigpy-znp==1.0.0

Running on a TI CC2531

After creating a group and restarting HA, the following pops up in the log

2020-07-21 14:54:17 ERROR (MainThread) [homeassistant.util.logging] Exception in functools.partial(<function async_add_entities at 0xb22ec9c0>, <bound method EntityPlatform._async_schedule_add_entities of <homeassistant.helpers.entity_platform.EntityPlatform object at 0xa8321710>>, [(<class 'homeassistant.components.zha.light.Light'>, ('68:0a:e2:ff:fe:b7:b6:97-1', <homeassistant.components.zha.core.device.ZHADevice object at 0xa83b68d0>, [<homeassistant.components.zha.core.channels.general.OnOffChannel object at 0xa83b6c70>, <homeassistant.components.zha.core.channels.general.LevelControlChannel object at 0xa83b6ad0>, <homeassistant.components.zha.core.channels.lighting.ColorChannel object at 0xa83b6cb0>])), (<class 'homeassistant.components.zha.light.Light'>, ('58:8e:81:ff:fe:21:88:6b-1', <homeassistant.components.zha.core.device.ZHADevice object at 0xa83b6e10>, [<homeassistant.components.zha.core.channels.general.OnOffChannel object at 0xa83e2e90>, <homeassistant.components.zha.core.channels.general.LevelControlChannel object at 0xa83e2dd0>, <homeassistant.components.zha.core.channels.lighting.ColorChannel object at 0xa83c6070>])), (<class 'homeassistant.components.zha.light.LightGroup'>, (['light.left', 'light.right'], 'light_zha_group_0x0002', 0x0002, None))]) when dispatching 'zha_add_new_entities': ()
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/discovery.py", line 46, in async_add_entities
    to_add = [ent_cls(*args) for ent_cls, args in entities]
  File "/usr/src/homeassistant/homeassistant/components/zha/core/discovery.py", line 46, in <listcomp>
    to_add = [ent_cls(*args) for ent_cls, args in entities]
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 491, in __init__
    super().__init__(entity_ids, unique_id, group_id, zha_device, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 105, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/zha/entity.py", line 220, in __init__
    f"{zha_device.gateway.groups.get(group_id).name}_zha_group_0x{group_id:04x}"
AttributeError: 'NoneType' object has no attribute 'gateway'
@puddly
Copy link
Collaborator

puddly commented Jul 21, 2020

Thanks for the bug report, it's now fixed in the latest dev commit. I have confirmed that multi-device light groups re-appear without issue after a restart using that specific version of Python and HA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants