『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 1136|回复: 4

[求助] Localtuya 接入HA一問

[复制链接]

68

主题

302

帖子

1966

积分

金牌会员

Rank: 6Rank: 6

积分
1966
金钱
1664
HASS币
0
发表于 2022-6-2 22:30:21 | 显示全部楼层 |阅读模式
本帖最后由 mr-one 于 2022-6-2 22:32 编辑

經hacs 將Localtuya 接入HA,並已下載大神 localtuya文件到custom_components,但出現以下error message,求各位英雄出手幫忙。謝
HA version - 2021.4.6


螢幕截圖 2022-06-02 下午10.06.06.png


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'



螢幕截圖 2022-06-02 下午10.06.06.png
EBFA5639-0ED7-4352-9315-DA747BBA928A.png
回复

使用道具 举报

35

主题

984

帖子

4744

积分

论坛元老

Rank: 8Rank: 8

积分
4744
金钱
3760
HASS币
20
发表于 2022-6-3 06:33:26 来自手机 | 显示全部楼层
建议直接从HACS安装后再试试,原来的删了吧
回复

使用道具 举报

68

主题

302

帖子

1966

积分

金牌会员

Rank: 6Rank: 6

积分
1966
金钱
1664
HASS币
0
 楼主| 发表于 2022-6-3 08:57:10 来自手机 | 显示全部楼层
已經直接從hacs 內安裝,仍然出現以上問題,不解所以希望各位出手幫忙
回复

使用道具 举报

10

主题

184

帖子

1822

积分

论坛技术达人

积分
1822
金钱
1633
HASS币
20
发表于 2022-6-3 14:41:19 | 显示全部楼层
SelectEntityModuleNotFoundError: No module named 'homeassistant.components.select'这行就是报错原因吧?
是不是你的ha版本太低,The Select integration was introduced in Home Assistant 2021.7, and it's used by 50.4% of the active installations. It scores internal on our quality scale.
回复

使用道具 举报

68

主题

302

帖子

1966

积分

金牌会员

Rank: 6Rank: 6

积分
1966
金钱
1664
HASS币
0
 楼主| 发表于 2022-6-3 21:13:04 | 显示全部楼层
szlww 发表于 2022-6-3 14:41
SelectEntityModuleNotFoundError: No module named 'homeassistant.components.select'这行就是报错原因吧 ...

明白, 我 try try first, thanks Ching!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 23:20 , Processed in 0.173905 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表