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 on custom_component init #30

Open
hanunes opened this issue Nov 17, 2021 · 3 comments
Open

Error on custom_component init #30

hanunes opened this issue Nov 17, 2021 · 3 comments

Comments

@hanunes
Copy link

hanunes commented Nov 17, 2021

After installing the integration and restarting HA, I get the following error

2021-11-17 11:34:24 ERROR (MainThread) [homeassistant.setup] Error during setup of component deebot
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/deebot_hacc/init.py", line 107, in setup
device["nick"],
KeyError: 'nick'

After some troubleshooting, I found out that the API is sending some different info:
2021-11-17 11:38:04 DEBUG (SyncWorker_0) [custom_components.deebot_hacc] Ecobot devices: [{'did': 'd59caf2e-9c7b-417e-b26f-2be320e6e117', 'name': 'E0001249918610430728', 'class': 'ls1ok3', 'resource': '3WFH', 'nick': None, 'company': 'eco-ng', 'bindTs': 1582317532533, 'service': {'jmq': 'jmq-ngiot-eu.dc.ww.ecouser.net', 'mqs': 'api-ngiot.dc-as.ww.ecouser.net'}, 'iotmq': True}, {'did': 'E0001161418600772095', 'name': 'E0001161418600772095', 'class': '155', 'resource': 'atom', 'company': 'eco-legacy', 'iotmq': False}]

As you can see, there is no "nick" property on the JSON returned by the API, for any of the vaccums on my account.

To resolve this:
In vacuum.py, line 60 and 61, change "nick" to "name"
In init.py, line 107, change "nick" to "name"

After changing this, restart HA, all vacuums should be visible.

@livefeed
Copy link

Thank you for this, fixed it for me.

@JohannesKie
Copy link

same here. helped to stop the nick error 😄
but still the device status is "error", yet this is the furthest i got with my 930 deebot

@Jizzay1
Copy link

Jizzay1 commented Apr 4, 2022

Thanks for this. i also had to change:
init.py LINE 107 from "nick" to "name" and got it to work for my N79!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants