Skip to content
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

King of Fans Zigbee Module brightness not working #79361

Closed
cgarwood opened this issue Sep 30, 2022 · 3 comments · Fixed by #79565
Closed

King of Fans Zigbee Module brightness not working #79361

cgarwood opened this issue Sep 30, 2022 · 3 comments · Fixed by #79565
Assignees

Comments

@cgarwood
Copy link
Member

The problem

When attempting to set the brightness of a light entity for a King of Fans fan module, the service call is failing with an unknown error returned in the UI. Turning the light off works OK, and turning on/adjusting the brightness of other zigbee lights (tested with Hue bulbs in my case) works OK. Seems to be limited to this specific module?

Worked OK in 2022.9 but not in 2022.10.0b0 or b1.

What version of Home Assistant Core has the issue?

2022.10.0b1

What was the last working version of Home Assistant Core?

core-2022.09

What type of installation are you running?

Home Assistant OS

Integration causing the issue

zha

Link to integration documentation on our website

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

Diagnostics information

zha-35f934202b46471d9df23ae587727b34-King Of Fans, Inc. HDC52EastwindFan-a2de680f29604f0dac0a0dbb02039369.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

[139860583438544] Value for field 'level' is required
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 648, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 408, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 475, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 450, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 683, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 546, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))


  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 291, in async_turn_on
    result = await self._level_channel.move_to_level_with_on_off(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/channels/base.py", line 78, in wrapper
    result = await command(*args, **kwds)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/kof/kof_mr101z.py", line 59, in command
    rsp = await super(NoReplyMixin, self).command(
  File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 310, in request
    hdr, request = self._create_request(
  File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 271, in _create_request
    request.serialize()  # Throw an error before generating a new TSN
  File "/usr/local/lib/python3.10/site-packages/zigpy/types/struct.py", line 209, in serialize
    for field, value in self.assigned_fields(strict=True):
  File "/usr/local/lib/python3.10/site-packages/zigpy/types/struct.py", line 177, in assigned_fields
    raise ValueError(f"Value for field {field.name!r} is required")
ValueError: Value for field 'level' is required

Additional information

No response

@homeassistant
Copy link
Contributor

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


zha documentation
zha source
(message by IssueLinks)

@drjared88
Copy link
Contributor

Same issue with the same device.

@javicalle
Copy link
Contributor

Maybe related with:
zigpy/zha-device-handlers#1783

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

Successfully merging a pull request may close this issue.

7 participants