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

Echec de la configuration / Error configuration and log #142

Closed
dexterkiller59 opened this issue Sep 12, 2023 · 0 comments · Fixed by #145
Closed

Echec de la configuration / Error configuration and log #142

dexterkiller59 opened this issue Sep 12, 2023 · 0 comments · Fixed by #145
Milestone

Comments

@dexterkiller59
Copy link

dexterkiller59 commented Sep 12, 2023

Hello,
i have install hacs and your plugin
i have the api key
i have test to put my adresse emaiol and password of ecoflow , the serial au delta2 is ok but i have this error on log :
Traceback (most recent call last):
File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 57, in authorize
#user_name = response["data"]["user"]["name"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'name'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ecoflow_cloud/init.py", line 53, in async_setup_entry
await hass.async_add_executor_job(auth.authorize)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 59, in authorize
except KeyError as key:
^^^^^^^^^^^^^^^^^^^^
custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt.EcoflowException: (("Failed to extract key 'name' from response: {'code': '0', 'message': 'Success', 'data': {'user': {'userId': '1xxxxxxxxxxxxxxxxxxxxxxx', 'email': '[email protected]', 'icon': 'https://websiteoss.ecoflow.com/symlink/xxxxxxxxxxxxxxxxxxxxxxxxxxx?Expires=2631354497&OSSAccessKeyId=xxxxxxxxxxxxxxx&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'state': 0, 'regtype': 'email', 'createTime': '2023-08-24 19:08:57', 'destroyed': 'NORMAL', 'registerLang': 'fr_FR', 'source': 'ECOFLOW_WEB', 'administrator': False, 'appid': 6, 'countryCode': 'FR'}, 'token': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, 'tid': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}",), {})

@tolwi tolwi added this to the v0.12.1 milestone Sep 14, 2023
@tolwi tolwi linked a pull request Sep 14, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants