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

Unexpected exception while adding integration #4

Open
pw-sys opened this issue Sep 12, 2020 · 1 comment
Open

Unexpected exception while adding integration #4

pw-sys opened this issue Sep 12, 2020 · 1 comment

Comments

@pw-sys
Copy link

pw-sys commented Sep 12, 2020

Version is Home Assistant 0.114.4 running in a VM

Describe the bug

Connecting via gui there is an exception:

  File "/config/custom_components/kia_uvo/config_flow.py", line 36, in async_step_user
    self.auth_info = await self.validate_authentication(user_input)
  File "/config/custom_components/kia_uvo/config_flow.py", line 86, in validate_authentication
    await self.hass.async_add_executor_job(self.kia.login)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/KiaUvo/__init__.py", line 44, in login
    self.auth = self.__login(self.username, self.password)
  File "/usr/local/lib/python3.8/site-packages/KiaUvo/__init__.py", line 56, in __login
    return AuthToken(xhr['result']['accessToken'], xhr['result']['refreshToken'])
KeyError: 'result'```



## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```Protokolldetails ( ERROR )
Logger: custom_components.kia_uvo.config_flow
Source: custom_components/kia_uvo/config_flow.py:86
Integration: Kia Uvo (documentation)
First occurred: 13:26:25 (2 occurrences)
Last logged: 13:26:48

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/kia_uvo/config_flow.py", line 36, in async_step_user
    self.auth_info = await self.validate_authentication(user_input)
  File "/config/custom_components/kia_uvo/config_flow.py", line 86, in validate_authentication
    await self.hass.async_add_executor_job(self.kia.login)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/KiaUvo/__init__.py", line 44, in login
    self.auth = self.__login(self.username, self.password)
  File "/usr/local/lib/python3.8/site-packages/KiaUvo/__init__.py", line 56, in __login
    return AuthToken(xhr['result']['accessToken'], xhr['result']['refreshToken'])
KeyError: 'result'

@pw-sys
Copy link
Author

pw-sys commented Sep 12, 2020

adding it via configuration.yaml with:

kia_uvo:
    username: !secret kia_user
    password: !secret kia_password

results in a checking error:

Invalid config for [kia_uvo]: [username] is an invalid option for [kia_uvo]. Check: kia_uvo->kia_uvo->username. (See /config/configuration.yaml, line 27).

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

1 participant