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
73.71k stars 30.83k forks source link

Roborock not intializing. #92128

Closed Idanit closed 1 year ago

Idanit commented 1 year ago

The problem

After entering verification code, integration is added fine, but cannot start. First is timeout after waiting for response and then an error fetching roborock data: 5 is not a valid RoborockDockTypeCode. Roborock Q7 Max+

What version of Home Assistant Core has the issue?

core-2023.5.0b0

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://rc.home-assistant.io/integrations/roborock

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.roborock.coordinator
Source: components/roborock/coordinator.py:67
Integration: Roborock (documentation, issues)
First occurred: 18:56:23 (6 occurrences)
Last logged: 19:00:56

Unexpected error fetching roborock data: 5 is not a valid RoborockDockTypeCode
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 77, in _async_update_data
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 67, in _update_device_prop
    device_prop = await self.api.get_prop(device_info.device.duid)
  File "/usr/local/lib/python3.10/site-packages/roborock/api.py", line 276, in get_prop
    [status, dnd_timer, clean_summary, consumable] = await asyncio.gather(
  File "/usr/local/lib/python3.10/site-packages/roborock/api.py", line 179, in get_status
    return Status.from_dict(status)
  File "/usr/local/lib/python3.10/site-packages/roborock/containers.py", line 45, in from_dict
    return from_dict(cls, decamelize_obj(data), config=Config(cast=[Enum]))
  File "/usr/local/lib/python3.10/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.10/site-packages/dacite/core.py", line 95, in _build_value
    data = _build_value_for_union(union=type_, data=data, config=config)
  File "/usr/local/lib/python3.10/site-packages/dacite/core.py", line 113, in _build_value_for_union
    return _build_value(type_=types[0], data=data, config=config)
  File "/usr/local/lib/python3.10/site-packages/dacite/core.py", line 105, in _build_value
    data = type_(data)
  File "/usr/local/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 5 is not a valid RoborockDockTypeCode

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @humbertogontijo, @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.

(message by CodeOwnersMention)


roborock documentation roborock source (message by IssueLinks)

Lash-L commented 1 year ago

Ah - I figured this wouldn't be a problem as we currently aren't using anything for docks in the core integration. I have a fix for this in an updated version of the library api. I wasn't planning to bump before the release - but I guess I need to now.

Thanks for checking and I will hopefully have a fix for you soon!

Idanit commented 1 year ago

You have closed the issue, but my problem still exist. core-2023.5.0b1

Lash-L commented 1 year ago

The fix will exist in b2. It did not make it out in time for b1

Lash-L commented 1 year ago

@Idanit please try with the latest beta (b2) and report back

Idanit commented 1 year ago

Sems to be working, Thanks a lot. Is it possible to extract map?

Lash-L commented 1 year ago

@Idanit as of right now - no.

But it will be possible in the future