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

Error setting up entry SkyConnect v1.0 for ZHA after Core Update from 2023.2.5 to 2023.3.0 #89005

Closed
PeterKawa opened this issue Mar 2, 2023 · 7 comments
Assignees

Comments

@PeterKawa
Copy link

PeterKawa commented Mar 2, 2023

Fix: Commenting out all of the references to TuyaDPType of the tuya custom quirk was the solution for me.

The problem

The ZHA integration failed to load after core update from 2023.2.5 to 2023.3.0.
A rollback to a recent backup with core version 2023.2.5 solves it.

What version of Home Assistant Core has the issue?

2023.3.0

What was the last working version of Home Assistant Core?

2023.2.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA with SkyConnect

Link to integration documentation on our website

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

Diagnostics information

home-assistant_zha_2023-03-02T01-11-10.651Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error setting up entry SkyConnect v1.0 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 100, in async_setup_entry
    setup_quirks(config)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/__init__.py", line 409, in setup
    importer.find_module(modname).load_module(modname)
  File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1063, in load_module
  File "<frozen importlib._bootstrap_external>", line 888, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 719, in _load
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/zha_quirks/ts0601_pirmotion.py", line 23, in <module>
    from zhaquirks.tuya.mcu import (
ImportError: cannot import name 'TuyaDPType' from 'zhaquirks.tuya.mcu' (/usr/local/lib/python3.10/site-packages/zhaquirks/tuya/mcu/__init__.py)

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Mar 2, 2023

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!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@balloob
Copy link
Member

balloob commented Mar 2, 2023

Remove the file config/zha_quirks/ts0601_pirmotion.py from your config.

@buzzeddesign
Copy link

buzzeddesign commented Mar 2, 2023

There's a fix to a different custom quirk over here but cause of the error is likely the same - this is due to a change in zigpy that broke the custom quirk

@PeterKawa
Copy link
Author

Remove the file config/zha_quirks/ts0601_pirmotion.py from your config.
Yes, but then I lose a sensor... ?

@PeterKawa
Copy link
Author

There's a fix to a different custom quirk over here but cause of the error is likely the same - this is due to a change in zigpy that broke the custom quirk

Thanks a mile m8!
Commenting out all of the references to TuyaDPType was the solution for me as well!

@igalg99
Copy link

igalg99 commented Mar 2, 2023

commenting out TuyaDPType was also solution for me.

@TheJulianJES
Copy link
Member

For everyone using a custom quirk, can you please make sure that an issue for that device is still open here: https://github.com/zigpy/zha-device-handlers/issues

Ideally, it should also have the "custom quirk available" tag, so we can track the quirks that still need to be merged into zha-quirks. If not, please tag me in that issue or create a new issue and provide the custom quirk in it.
Best way is to PR the changes of course, but creating an issue is better than nothing.

Custom quirks are not a solution and just a temporary workaround.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants