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

zcl_cmd stopped working, now throws "'list' object is not callable" error #282

Open
defux-23 opened this issue Jan 19, 2025 · 1 comment

Comments

@defux-23
Copy link

I used zcl_cmd to send a custom cluster command for candle effect to a Hue Play. The code below worked fine until a few months ago:

action:` zha_toolkit.zcl_cmd
data:
ieee: light.hue_play_1_licht
manf: 4107
endpoint: 11
cluster: 64515
dir: 0
cmd: 0
args:
- 33
- 0
- 1
- 1

Then HA started to throw an error "'list' object is not callable" when this command should be executed.

It was not high on my priority list, but now I played around a bit to figure out how to fix it. I also tried to make a new command from scratch in a script with the visual editor in HA, but end up with the same error. Also tried to give the argument list as "args: [33, 0, 1, 1]", but this does also not change anything (and is retranslated by the visual editor to the above when switching back and forth anyway).

When trying around further, I also experienced also that the "dir: 0" forces HA to stay in yaml editor mode, as soon as it is removed it switches automatically to the input mask/visual editor (but that's probably not relevant, maybe just because the input mask has no field for "direction".

Strangely, even if I remove the "args:"-section completely, I still end up with the "'list' object is not callable" error. I also searched through different HA forums, but did not find any matching problem.

As the code above was working fine, I was wondering whether something was changed in the way lists of arguments are processed by ZHA Toolkit in one of the previous updates?

@mdeweerd
Copy link
Owner

There have been changes lately:

Somewhat related, but the issue was different.

ZHA/zigpy has undergone quite a lot of changes itself and I think that zcl_cmd needs to be adapted to that.
Probably the list of bytes must be provided in a different way - I guess an objet with a method on it (probably to serialize the data) - I did not look at zigpy/zha for this.

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