homeassistant-roborock
homeassistant-roborock copied to clipboard
Roborock S7 - not working after update of HA to 2023.10.0
Version of the custom_component
1.0.12
What vacuum are you using?
Roborock S7
Describe the bug
After updating Home Assistant to 2023.10.0 and custom integration to 1.0.12, vacuum is no longer available and following log entry (pasted below) does appear. Restarting Home Assistant and custom integration dont help.
When I have completely removed integration, restarted HA and tried to add integration again, I get following error:
Same issue happens when I try to add account using email and password or authenticator code. Native Roborock app works correctly.
Debug log
Logger: custom_components.roborock.coordinator
Source: helpers/update_coordinator.py:290
Integration: Roborock ([documentation](https://github.com/humbertogontijo/homeassistant-roborock), [issues](https://github.com/humbertogontijo/homeassistant-roborock/issues))
First occurred: 10:25:36 (34 occurrences)
Last logged: 11:00:16
Unexpected error fetching roborock data: 'types.UnionType' object has no attribute '__origin__'
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 22, in extract_origin_collection
return collection.__extra__
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'types.UnionType' object has no attribute '__extra__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/roborock/coordinator.py", line 116, in _async_update_data
await self.fill_device_info(self.device_info)
File "/config/custom_components/roborock/coordinator.py", line 101, in fill_device_info
await asyncio.gather(
File "/config/custom_components/roborock/coordinator.py", line 66, in fill_device_prop
device_prop = await self.api.get_prop()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 486, in get_prop
[status, clean_summary, consumable] = await asyncio.gather(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 413, in get_status
return self._status_type.from_dict(await self.cache[CacheableAttribute.status].async_value())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/containers.py", line 90, in from_dict
return from_dict(cls, decamelize_obj(data, ignore_keys), config=Config(cast=[Enum]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/dacite/core.py", line 101, in _build_value
if is_subclass(type_, cast_type):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 168, in is_subclass
if is_generic_collection(sub_type):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 147, in is_generic_collection
origin = extract_origin_collection(type_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dacite/types.py", line 24, in extract_origin_collection
return collection.__origin__
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'types.UnionType' object has no attribute '__origin__'
Have the same problems. The integration doesn't work anymore after the last update today.
I see now that this seems to be the same problem I have in #500.
There's an Roborock update which works now.
There's an Roborock update which works now.
You mean Home Assistant native Roborock integration update, or update for this custom integration? Because for this custom integration, newest version in releases is 1.0.12 which is not working.
Okay people have been having this problem in core too. The govee hacs integration causes a wrong version of the dependency we need to be installed check out this thread: https://github.com/home-assistant/core/issues/101289
Okay people have been having this problem in core too. The hover hacs integration causes a wrong version of the dependency we need to be installed check out this thread: home-assistant/core#101289
Thanks, but they are pointing to govee custom integration, issue seems not related to my case as I dont use it. I had to rollback from backup to 2023.9.3 till issue will be resolved :(
If not Govee then something else is doing it, you need to look through your other integrations. You can try to do what I did here on your local instance: https://github.com/humbertogontijo/homeassistant-roborock/pull/501
But you should do a pip show dacite in your docker container to figure out what all is using dacite
If not Govee then something else is doing it, you need to look through your other integrations. You can try to do what I did here on your local instance: #501
But you should do a pip show dacite in your docker container to figure out what all is using dacite
After pip show dacite: Required-by: brother, gios, home-assistant-chip-clusters, nettigo-air-monitor, python-matter-server, python-roborock
I see that You are also posting in issue at thread that You have share earlier, seems that it may be common with what jorblad have as he is using HomeWhiz which have dacite in requirements (but without version defined). But after over 3 hours of backup recovery, I cannot test it now to update HA, update integration and make test with steps related to disabling HomeWhiz, deleting Roborock integration etc :(
I had an issue after HA 2023.10 update, but with Roborock Integration version 1.0.11. The update 1.0.12 solved the problem on my system. I restarted the whole server after 2023.10 update and then pulled the 1.0.12 update. Finally restarted Home Assistant and everything works well.
If you are having an issue with dacite - you can try installing the main branch and see if that fixes your problem
There's an Roborock update which works now.
You mean Home Assistant native Roborock integration update, or update for this custom integration? Because for this custom integration, newest version in releases is 1.0.12 which is not working.
Same here. I had this error:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.roborock.config_flow
Source: custom_components/roborock/config_flow.py:239
Integration: Roborock (documentation, issues)
First occurred: 00:45:51 (5 occurrences)
Last logged: 00:46:54
wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'xyz', 's': 'xyz', 'h': 'xyz', 'k': 'xyz', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-3.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"
wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'xyz', 's': 'xyz', 'h': 'DlvKmsE45j', 'k': 'xyz', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-3.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"
wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'xyz', 's': 'xyz', 'h': 'xyz', 'k': 'xyz', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-3.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"
wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'xyz', 's': 'xyz', 'h': 'xyz', 'k': 'xyz', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-3.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"
wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'xyz', 's': 'xyz', 'h': 'xyz', 'k': 'xyz', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-3.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"
Traceback (most recent call last):
File "/config/custom_components/roborock/config_flow.py", line 239, in _pass_login
login_data = await self._client.pass_login(password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/lsiopy/lib/python3.11/site-packages/roborock/api.py", line 628, in pass_login
return UserData.from_dict(user_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/lsiopy/lib/python3.11/site-packages/roborock/containers.py", line 90, in from_dict
return from_dict(cls, decamelize_obj(data, ignore_keys), config=Config(cast=[Enum]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/lsiopy/lib/python3.11/site-packages/dacite/core.py", line 68, in from_dict
raise WrongTypeError(field_path=field.name, field_type=field.type, value=value)
dacite.exceptions.WrongTypeError: wrong value type for field "rriot" - should be "roborock.containers.RRiot | None" instead of value "{'u': 'xyz', 's': 'xyz', 'h': 'xyz', 'k': 'xyz', 'r': {'r': 'EU', 'a': 'https://api-eu.roborock.com', 'm': 'ssl://mqtt-eu-3.roborock.com:8883', 'l': 'https://wood-eu.roborock.com'}}" of type "dict"
Now I removed the integration / account and cannot add it anymore because no devices are found.
Okay people have been having this problem in core too. The govee hacs integration causes a wrong version of the dependency we need to be installed check out this thread: home-assistant/core#101289
Even after I followed the recommendation and configured the updated dependency for Govee, the roborock integration still throws the same exception and does not work.