Open Nerwyn opened 2 months ago
Same issue here :
Update Linky data: Error executing script. Unexpected error for call_service at pos 1: module 'zigpy.zcl.foundation' has no attribute 'DATA_TYPES'
Exception 'module 'zigpy.zcl.foundation' has no attribute 'DATA_TYPES'' for service call with data '{'zha_toolkit_version': 'v1.1.19', 'zigpy_version': '0.66.0', 'zigpy_rf_version': '0.40.5', 'ieee_org': 00:15:8d:00:05:d2:9d:c3, 'ieee': '00:15:8d:00:05:d2:9d:c3', 'command': 'attr_read', 'command_data': None, 'start_time': '2024-09-04T23:13:00.154898+00:00', 'errors': ['AttributeError("module \'zigpy.zcl.foundation\' has no attribute \'DATA_TYPES\'")'], 'params': {'endpoint_id': 1, 'cluster_id': 2820, 'attr_id': 774, 'dir': 0, 'tries': 1, 'expect_reply': True, 'args': [], 'state_id': 'sensor.linky_apparent_power', 'allow_create': True, 'read_before_write': True, 'read_after_write': True}, 'success': False}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 755, in async_trigger
return await self.action_script.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1795, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 557, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/zha_toolkit/__init__.py", line 828, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/__init__.py", line 784, in toolkit_service
handler_result = await handler(
^^^^^^^^^^^^^^
File "/config/custom_components/zha_toolkit/__init__.py", line 894, in command_handler_default
return await default.default(
^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/zha_toolkit/default.py", line 51, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/zcl_attr.py", line 311, in attr_read
await attr_write(*args, **kwargs)
File "/config/custom_components/zha_toolkit/zcl_attr.py", line 385, in attr_write
found_attr_type = f.DATA_TYPES.pytype_to_datatype_id(
^^^^^^^^^^^^
AttributeError: module 'zigpy.zcl.foundation' has no attribute 'DATA_TYPES'
Here is the commit in Zigpy that broke ZHA Toolkit: https://github.com/zigpy/zigpy/pull/1463/commits/8db37354f7e7cbbceb5bbec4902e872961c40a73
Not very complex to fix (f.DATA_TYPES.pytype_to_datatype_id()
=> f.DataType.from_python_type()
should do the trick - UNTESTED), but there is potentially a big number of users impacted.
+1. Same issue here
+1
+1 - Same Problem
Not that trivial finally. The way they converted DATA_TYPES to DataType requires a lot of changes in ZHA Toolkit to match the new structure of the class. 😒
Temp fix : downgrading to 2024.8.3 (zigpy < 0.66) solve the issue.
ha core update --version 2024.8.3
I was able to fix most errors by replacing f.DATA_TYPES.pytype_to_datatype_id()
with f.DataType.from_python_type().type_id
However I can see references to DATA_TYPES
in scan_device.py and utils.py so more fixes are most likely needed.
Hello, does anyone know if there will be anything new in a next update? Just to know if i retrograde or if I wait a little. Thanks :)
Hello, does anyone know if there will be anything new in a next update? Just to know if i retrograde or if I wait a little. Thanks :)
If you do not need Home Assistant new features, do not upgrade ! At each update there are news bugs with Zhatoolkit ! I'm using HA 2024.6.4 and all works perfect with this version.
What I find strange..... is that it is working (for me) with 9-BETA...... and NOT with 9.0
same issue
+1
Same issue here
+1
+1
What I find strange..... is that it is working (for me) with 9-BETA...... and NOT with 9.0
Home Assistant 9.0 -BETA was probably before ZHA was bumped to 0.0.32 which in turn uses 0.66.0
https://github.com/home-assistant/core/pull/124804
https://github.com/zigpy/zha/releases/tag/0.0.32
same issue here
https://github.com/mdeweerd/zha-toolkit/pull/263 fixes it but has yet to be merged and released, you can download those 4 affected .py files and overwrite the ones on your HA install and then relaunch zha-toolkit (or reboot your HA install) and it works again.
Thank you, with #263 it works again for me
Getting the same issue here. Anything can be done to help expedite this, beside a review from @mdeweerd ?
+1
Also working with 2024.10.0 and 2024.10.1
+1.
Is mdeweerd OK? Can someone who knows him or has mutual friends in common contact him and do a wellness check? No activity in this repo since months.
I'm very glad to hear he's okay. :-) It did not occur to me to check his contributions page. Thanks for the tip!
issue still exists in HA Core update 2024.10.1
Tested and working for 2024.10.2
Its not working for me
I still got "module 'zigpy.zcl.foundation' has no attribute 'DATA_TYPES'"
Tested for 2024.10.2, zha-toolkit v1.121 and v1.1.19
Sorry for the confusion, I meant working with fixes from #263
+1 it affects many of my devices for months now.
+1 it affects many of my devices for months now.
Just use the changed files of #263
As of Home Assistant Core 2024.9.0, the following error is thrown for the following action: