- 积分
- 758
- 金钱
- 628
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 758
- 金钱
- 628
- HASS币
- 0
|
楼主 |
发表于 2022-7-16 20:04:33
|
显示全部楼层
此错误来自自定义集成。
Logger: homeassistant.config
Source: custom_components/phicomm_dc1_switch/switch.py:16
Integration: phicomm_dc1_switch
First occurred: 19:55:58 (3 occurrences)
Last logged: 19:55:58
Platform error: switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 618, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 635, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/phicomm_dc1_switch/switch.py", line 16, in <module>
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
ImportError: cannot import name 'SwitchDevice' from 'homeassistant.components.switch' (/usr/src/homeassistant/homeassistant/components/switch/__init__.py)
|
|