home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.63k stars 30.4k forks source link

Robo Rock integration: setup not working #128497

Open tispokes opened 2 days ago

tispokes commented 2 days ago

The problem

I enter the correct mail, then the copied code, this error occurs. (I'm using the roborock app on my android 14 and my gf on iPhone, same account.)

Core 2024.10.2 Supervisor 2024.10.2 Operating System 13.1 Frontend 20241002.3

What version of Home Assistant Core has the issue?

Core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Roborock

Link to integration documentation on our website

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

Diagnostics information

Not able to setup, so no diagnostics data. Just the log.

Logger: homeassistant.components.roborock.config_flow Source: components/roborock/config_flow.py:109 integration: roborock (documentation, issues) First occurred: October 15, 2024 at 20:59:41 (2 occurrences) Last logged: 02:53:12

Unexpected exception Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 22, in extract_origin_collection return collection.extra ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'types.UnionType' object has no attribute 'extra'. Did you mean: 'str'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/roborock/containers.py", line 110, in from_dict return from_dict(cls, decamelize_obj(data, ignore_keys), config=Config(cast=[Enum])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dacite/core.py", line 64, in from_dict value = _buildvalue(type=field_type, data=field_data, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dacite/core.py", line 101, in _build_value if issubclass(type, cast_type): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 168, in is_subclass if is_generic_collection(sub_type): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 147, in is_generic_collection origin = extract_origincollection(type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 24, in extract_origin_collection return collection.origin ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'types.UnionType' object has no attribute 'origin'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/roborock/config_flow.py", line 109, in async_step_code login_data = await self._client.code_login(code) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/web_api.py", line 179, in code_login return UserData.from_dict(user_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/containers.py", line 112, in from_dict raise RoborockException("It seems like you have an outdated version of dacite.") from err roborock.exceptions.RoborockException: It seems like you have an outdated version of dacite.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.roborock.config_flow
Source: components/roborock/config_flow.py:109
integration: roborock (documentation, issues)
First occurred: October 15, 2024 at 20:59:41 (2 occurrences)
Last logged: 02:53:12

Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 22, in extract_origin_collection
    return collection.__extra__
           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'types.UnionType' object has no attribute '__extra__'. Did you mean: '__str__'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/roborock/containers.py", line 110, in from_dict
    return from_dict(cls, decamelize_obj(data, ignore_keys), config=Config(cast=[Enum]))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dacite/core.py", line 64, in from_dict
    value = _build_value(type_=field_type, data=field_data, config=config)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dacite/core.py", line 101, in _build_value
    if is_subclass(type_, cast_type):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 168, in is_subclass
    if is_generic_collection(sub_type):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 147, in is_generic_collection
    origin = extract_origin_collection(type_)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dacite/types.py", line 24, in extract_origin_collection
    return collection.__origin__
           ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'types.UnionType' object has no attribute '__origin__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/roborock/config_flow.py", line 109, in async_step_code
    login_data = await self._client.code_login(code)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/web_api.py", line 179, in code_login
    return UserData.from_dict(user_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/containers.py", line 112, in from_dict
    raise RoborockException("It seems like you have an outdated version of dacite.") from err
roborock.exceptions.RoborockException: It seems like you have an outdated version of dacite.

Additional information

No response

home-assistant[bot] commented 2 days ago

Hey there @lash-l, mind taking a look at this issue as it has been labeled with an integration (roborock) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `roborock` 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 roborock` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


roborock documentation roborock source (message by IssueLinks)

gimmel commented 1 day ago

I had the same problem, but after booting into safe mode, the Roborock integration setup worked. After uninstalling the HACS govee integration (https://github.com/LaggAt/hacs-govee), the Roborock integration now works without problems.