- 积分
- 166
- 金钱
- 154
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
注册会员
- 积分
- 166
- 金钱
- 154
- HASS币
- 0
|
发表于 2022-12-14 14:02:34
|
显示全部楼层
你好,按照github上的文档将插件集成到homeassistant。添加了配置,重启时提示这个错误,这是为啥呢?帮忙纠正下,谢谢
2022-12-14 13:52:23.181 ERROR (MainThread) [homeassistant.config] Platform error: sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 865, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 728, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 745, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/custom_components/ezviz_alarm_to_baidu/sensor.py", line 10, in <module>
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice, DEVICE_CLASS_MOTION, DOMAIN
ImportError: cannot import name 'BinarySensorDevice' from 'homeassistant.components.binary_sensor' (/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py) |
|