L60 Support
I am getting the following error after entering my eufy username and password.
Unexpected exception: 'device'
Traceback (most recent call last):
File "/config/custom_components/robovac/config_flow.py", line 141, in get_eufy_vacuums
device = tuya_client.get_device(item["device"]["id"])
~~~~^^^^^^^^^^
KeyError: 'device'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/robovac/config_flow.py", line 185, in async_step_user
valid_data = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/robovac/config_flow.py", line 167, in validate_input
await hass.async_add_executor_job(get_eufy_vacuums, data)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/robovac/config_flow.py", line 157, in get_eufy_vacuums
item["device"]["id"]
~~~~^^^^^^^^^^
KeyError: 'device'
Do you get that on the master branch too? I have tested this and have another person using this branch without this issue coming up?
I do not get the same error on the master branch. It has also been reported by someone else here: https://github.com/CodeFoodPixels/robovac/issues/112#issuecomment-2683137921
By removing ["device"] from line 141 of config_flow.py the error goes away and I can connect to the vacuum. However, it shows the status incorrectly i.e. shows cleaning when docked.
Works fine here. Installed the branch from the PR, I have 2 L60's running here. Maybe it's got something to do with that? Having a single or multiple Robovac devices?
Although I have seen in another PR here (https://github.com/CodeFoodPixels/robovac/pull/64/files#diff-1a399db0f45c880538b174870af4a32a874c68567066d843c79217af7f4613b3L135) that there are also changes to devices / device inside config_flow.
I'm not a python developer, but want to help - what can I do to output the item array?
Ok, found it. Code is only executed on config. This is the structure from device_response:
{
"res_code": 1,
"message": "",
"devices": [
{
"id": "...",
...
},{
"id": "...",
}
]
}
So yes, the ["device"] should be removed. Also on lines 157 and 160.
Would this also include support for the L60 hybrid? Since this also does mopping i assume some additional changes are required. If not i'd be happy to pick it up as a separate PR
Maybe some base classes for the separate device classes could make sense
I get the following exception from the tuya part:
{'t': [...], 'success': False, 'errorCode': 'PERMISSION_DENIED', 'status': 'error', 'errorMsg': 'No access'}
Is there something else that changed?
Or does this need time after the initial device setup in the app?