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

集成前端UI添加小米账户时报错 #34

Closed
qiuyuxuan1999 opened this issue Mar 15, 2021 · 2 comments
Closed

集成前端UI添加小米账户时报错 #34

qiuyuxuan1999 opened this issue Mar 15, 2021 · 2 comments
Labels
bug Something isn't working fixed bug fixed

Comments

@qiuyuxuan1999
Copy link

qiuyuxuan1999 commented Mar 15, 2021

大佬好,先感谢大佬的插件。
最新版本插件可以前端配置云账号添加设备了。但是我在配置的时候添加用户名密码之后报错如图。
Screenshot_20210315_232056

用设备IP token本地添加没问题。但我需要这个云端添加模式,以便在没有部署HA的地方也能接入米家设备。

HA报错日志去下:
Logger: aiohttp.server
Source: custom_components/xiaomi_miot/config_flow.py:114
First occurred: 下午10:42:13 (2 occurrences)
Last logged: 下午10:42:16

Error handling request
Traceback (most recent call last):
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
return await handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
return await handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 155, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 213, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/volume1/@appstore/homeassistant/var/config/custom_components/xiaomi_miot/config_flow.py", line 178, in async_step_cloud
return await self.async_step_cloud_filter(user_input)
File "/volume1/@appstore/homeassistant/var/config/custom_components/xiaomi_miot/config_flow.py", line 196, in async_step_cloud_filter
schema = await get_cloud_filter_schema(self.hass, user_input, errors, schema)
File "/volume1/@appstore/homeassistant/var/config/custom_components/xiaomi_miot/config_flow.py", line 114, in get_cloud_filter_schema
hass.data[DOMAIN]['prev_input'] = user_input
KeyError: 'xiaomi_miot'

我的安装环境如下,是在群晖第三方套件安装的HA:
System Health

version: 2021.1.5
installation_type: Home Assistant Core
dev: false
hassio: false
docker: false
virtualenv: true
python_version: 3.8.7
os_name: Linux
os_version: 3.10.105
arch: armv7l
timezone: Asia/Shanghai

GitHub API: ok
Github API Calls Remaining: 4887
Installed Version: main
Stage: running
Available Repositories: 759
Installed Repositories: 12

logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok

dashboards: 3
mode: storage
views: 1
resources: 9

logged_in: true
can_reach_micloud_server: ok
accounts_count: 1
account_devices_count: 45
added_devices: 9

还望大佬帮忙看看是什么问题,多谢。

@al-one
Copy link
Owner

al-one commented Mar 15, 2021

建议你手动安装下。

@qiuyuxuan1999
Copy link
Author

建议你手动安装下。

多谢大佬,搞了好久终于搞好了。不过手动安装还是不行,我是手动安装后,先加载了一个本地设备,然后再添加云账号,就可以了。

al-one added a commit that referenced this issue Mar 19, 2021
@al-one al-one added fixed bug fixed bug Something isn't working labels Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed bug fixed
Projects
None yet
Development

No branches or pull requests

2 participants