|
发表于 2024-6-27 00:29:45
|
显示全部楼层
本帖最后由 mengyu 于 2024-6-27 00:31 编辑
from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
18051: ["Xiaomi", "Occupancy Sensor", "XMOSB01XS", "xiaomi.sensor_occupy.03"],
"spec": [
# main sensors
BoolConv("occupancy", "binary_sensor", mi="2.p.1078"),#Tested
BaseConv("illuminance", "sensor", mi="2.p.1005"),#Tested
# other sensors
BaseConv("battery", "sensor", mi="3.p.1003"),
],
}] + DEVICES
小米人在添加代码后报错,我更新多模插件到4.0以后出现无法加载,提示无法加载配置向导,我hass版本为2024.6.4 日志记录器: custom_components.xiaomi_gateway3.core.converters
来源: custom_components/xiaomi_gateway3/core/converters/__init__.py:14
集成: Xiaomi Gateway 3 (文档, 问题)
首次出现: 00:16:49 (1 次总计出现)
上次记录: 00:16:49
Can't load external converters
Traceback (most recent call last):
File "/config/custom_components/xiaomi_gateway3/core/converters/__init__.py", line 14, in <module>
from xiaomi_gateway3 import DEVICES
File "/config/xiaomi_gateway3.py", line 8, in <module>
BaseConv("illuminance", "sensor", mi="2.p.1005"),#Tested
^^^^^^^^
NameError: name 'BaseConv' is not defined. Did you mean: 'MaskConv'?
我只有多模1,插件版本号是3.3.6,求大佬帮忙解决一下 |
|