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'
大佬好,先感谢大佬的插件。 最新版本插件可以前端配置云账号添加设备了。但是我在配置的时候添加用户名密码之后报错如图。
用设备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
还望大佬帮忙看看是什么问题,多谢。