Closed fingolfin closed 8 months ago
Sorry, I should have included more information about my setup:
Please let me know if I can provide any other information that might be helpful.
Also, I just want to stress that I realize that I am not at all entitled to any help from you, you already did a lot by providing these quirks. But just in case you have any ideas what might resolve this, I'd really appreciate it.
(In the end I guess I could de-install the denonavr integration and hope this will fix it, but (a) I'd really like to use it, and (b) perhaps getting to the bottom of this will help other users?)
Are you sure you're using latest quirk version?? You could just re-download and replace file.
Error says that there's a duplicate:
TypeError: Duplicate definitions exist for ['target_temperature']
If you Ctrl+F on the code window and search for "target_temperature" you will see that there's no duplicate of "target_temperature" https://github.com/jacekk015/zha_quirks/blob/main/ts0601_trv_me167.py
Yes I am sure it is the latest quirk version. In fact I have a git clone of this repository inside config/quirks/
, and that's the only quirks directory. And the error messages clearly have the path to that file in them.
And yes, the first thing I did before reporting this was to check that target_temperature
only occurs once in your code, but the complaint doesn't seem to be that your code has target_temperature
twice, but rather that something else already defines target_temperature
. The error is instead raised by code in zigpy
in zigpy/zcl/__init__.py
. This seems to be a relatively recent check (it was "only" added in May 2023 to zigpy), which may explain why it worked for me before?
Last night I experimemented some more and tried what happens if I deactivate the denonavr
integration. I did so and restarted, and now the log is somewhat different:
2023-11-20 23:22:47.844 ERROR (MainThread) [zhaquirks] Unexpected exception importing custom quirk 'ts0601_trv_me167'
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/zhaquirks/__init__.py", line 460, in setup
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/quirks/ts0601_trv_me167.py", line 151, in <module>
class ME167ManufCluster(TuyaManufClusterAttributes):
File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 167, in __init_subclass__
raise TypeError(f"Duplicate definitions exist for {duplicates}")
TypeError: Duplicate definitions exist for ['target_temperature']
2023-11-20 23:22:47.852 WARNING (MainThread) [zhaquirks] Loaded custom quirks. Please contribute them to https://github.com/zigpy/zha-device-handlers
2023-11-20 23:22:58.038 WARNING (MainThread) [zigpy.zcl] [0x3E5B:1:0xef00] Unknown cluster command 2 b'\x00l\x05\x02\x00\x04\x00\x00\x00\xc8'
2023-11-20 23:22:58.048 WARNING (MainThread) [zigpy.zcl] [0x3E5B:1:0xef00] Unknown cluster command 2 b'\x00m\x05\x02\x00\x04\x00\x00\x00\xc8'
2023-11-20 23:22:58.063 WARNING (MainThread) [zigpy.zcl] [0x3E5B:1:0xef00] Unknown cluster command 2 b'\x00m\x05\x02\x00\x04\x00\x00\x00\xc8'
2023-11-20 23:22:58.245 WARNING (MainThread) [zigpy.zcl] [0x3E5B:1:0xef00] Unknown cluster command 2 b'\x00|\x05\x02\x00\x04\x00\x00\x00\xbe'
... [many more similar messages; note that I don't know whether they are related to zha_quirk]
Nope. ZCL init loads the quirk and it sees duplicate of "target_temperature" - error is moving up like a bubble. Quirk code can't brake just by laying on the disk drive. If you can't just download the quirk and put it there then I can't help you.
Duplicate.... was an error of very, very old quirks. They've started to show since they made an update in ZHA/ZCL.
"target_temperature" is just a name in the quirk - it's on the Manufacturer specific attributes side. You could also call it "my_beautiful_temperature" - it totally doesn't matter. It's just a name to show on the Attributes list in Manage cluster devices. Attribute ID's is what's matter and the temp attribute is:
ME167_TEMPERATURE_ATTR = 0x0205
That attribute is then mapped to "local_temperature" attribute and that's what the HA sees for TRV room temp.
I have a
_TZE200_6rdj8dzm
and this quirk used to work just fine for me. But it stopped after a Home Assistant update or config change some time ago (not sure when exactly, as it was summer and so it was unused). Looking at the logs, I see a Python stack trace:and so on.
So it seems there is a conflict with the denonavr integration? But how is that even possible, I would have expected these things to be isolated from each other due to namespacing?