kia_uvo
kia_uvo copied to clipboard
Unexpected exception while adding integration
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'
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).