|
本帖最后由 mr-one 于 2022-6-2 22:32 编辑
經hacs 將Localtuya 接入HA,並已下載大神 localtuya文件到custom_components,但出現以下error message,求各位英雄出手幫忙。謝
HA version - 2021.4.6
Logger: aiohttp.server
Source: custom_components/localtuya/select.py:6
First occurred: 下午10:04:08 (1 occurrences)
Last logged: 下午10:04:08 Error handling requestTraceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 107, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 214, in _async_handle_step result: dict = await getattr(flow, method)(user_input) File "/config/custom_components/localtuya/config_flow.py", line 337, in async_step_pick_entity_type return await self.async_step_add_entity() File "/config/custom_components/localtuya/config_flow.py", line 366, in async_step_add_entity data_schema=platform_schema(self.platform, self.dps_strings), File "/config/custom_components/localtuya/config_flow.py", line 143, in platform_schema return vol.Schema(schema).extend(flow_schema(platform, dps_strings)) File "/config/custom_components/localtuya/config_flow.py", line 149, in flow_schema return import_module("." + platform, integration_module).flow_schema(dps_strings) File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/config/custom_components/localtuya/__init__.py", line 104, in <module> CONFIG_SCHEMA = config_schema() File "/config/custom_components/localtuya/config_flow.py", line 165, in config_schema entity_schemas = [ File "/config/custom_components/localtuya/config_flow.py", line 166, in <listcomp> platform_schema(platform, range(1, 256), yaml=True) for platform in PLATFORMS File "/config/custom_components/localtuya/config_flow.py", line 143, in platform_schema return vol.Schema(schema).extend(flow_schema(platform, dps_strings)) File "/config/custom_components/localtuya/config_flow.py", line 149, in flow_schema return import_module("." + platform, integration_module).flow_schema(dps_strings) File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/config/custom_components/localtuya/select.py", line 6, in <module> from homeassistant.components.select import DOMAIN, SelectEntityModuleNotFoundError: No module named 'homeassistant.components.select'
|
-
-
|