ZHA Problem using the level control cluster using the UI

In the device Info, I use the Manage Cluster option to try sending a few commands. Commands for the on off cluster do work, but when I try the LevelControl, there is an error that is produced when sending the move_to_level command:

2022-01-02 00:17:13 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140180631787744] Wrong number of parameters for request, expected 2 argument(s)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 733, in admin_handler
    await result
  File "/usr/src/homeassistant/homeassistant/components/zha/api.py", line 1059, in issue_zigbee_cluster_command
    response = await zha_device.issue_cluster_command(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/device.py", line 634, in issue_cluster_command
    response = await cluster.command(
ValueError: Wrong number of parameters for request, expected 2 argument(s)

It seems like there is an argument missing from the ui as the ZCL command takes both a level and a transition time as parameter, but the ui only allow setting one value.

Is there a way to overcome this?

I am currently testing HA in general (never use it before) with a Sinope zigbee dimmer and was looking into clues as to why there is no intensity adjustment available on the device (just the on-off).

Looking in https://github.com/home-assistant/frontend/blob/76a4b1efbd2b0479d409ff370d39fcfed598f302/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts , I see that a single field is hard-coded.

I see three options:

  • Make it 3 fields for all commands, the user got to know what they mean,
  • expose the number of options, their name and maybe a help string from the core
  • change the type of the field so that it takes multiples arguments (string?)

I am not really familiar with the codebase, so I won’t jump modifying anything on the short term. I have seen there are some code owners that could probably have an opinion on the matter.

1 Like

oh I just found this:

and this: