tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
284 stars 48 forks source link

Echec de la configuration / Error configuration and log #142

Closed dexterkiller59 closed 9 months ago

dexterkiller59 commented 9 months ago

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': 'XXXXXXXXXXXX@gmail.com', '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'}",), {})