|
发表于 2023-9-23 23:05:47
|
显示全部楼层
安装上了,但是添加好电机后还是提示错误:
Logger: homeassistant.components.cover
Source: custom_components/mijia_curtain/cover.py:253
Integration: 窗帘 (documentation, issues)
First occurred: 23:02:13 (1 occurrences)
Last logged: 23:02:13
Error while setting up mijia_curtain platform for cover
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mijia_curtain/cover.py", line 187, in setup_platform
cover = MijiaCurtain(name, host, token, model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mijia_curtain/cover.py", line 288, in __init__
self._mapping = get_mapping(self._model, self._mapping)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mijia_curtain/cover.py", line 253, in get_mapping
current_position_prop = [prop for prop in curtain_properties if ATTR_CURRENT_POSITION in prop['type']][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
|
|