- 积分
- 821
- 金钱
- 704
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 821
- 金钱
- 704
- HASS币
- 0
|
发表于 2024-7-10 06:58:55
|
显示全部楼层
请教一下完整的F2转换器怎么写?我这抄了网上某位大佬的,接上后似乎没有数据啊。。。
from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
# https://home.miot-spec.com/spec/ailol.remote.ts4
18250: ["ZXFANS", "ZXFANS F2 smart knob remote control", "ailol.remote.ts4"],
"spec": [
BaseConv("battery", "sensor", mi="4.p.1003"),
BaseConv("action", "sensor"),
MapConv("action", mi="5.e.1012.p.1", map={1: BUTTON_1_SINGLE, 2: BUTTON_2_SINGLE, 3: BUTTON_3_SINGLE, 4: BUTTON_4_SINGLE, 5: "knob_increasing", 6: "knob_reduced"}),
MapConv("action", mi="5.e.1013.p.1", map={1: BUTTON_1_DOUBLE, 2: BUTTON_2_DOUBLE, 3: BUTTON_3_DOUBLE, 4: BUTTON_4_DOUBLE}),
MapConv("action", mi="5.e.1014.p.1", map={1: BUTTON_1_HOLD, 2: BUTTON_2_HOLD, 3: BUTTON_3_HOLD, 4: BUTTON_4_HOLD}),
]
}] + DEVICES
另外,
我用的是那个F2的青春版,160多买的,米家接入后也遇到一个奇怪问题,在米家里面,设备自己的日志能看到每个动作,但设置自动化,由F2来触发某个米家风扇的开和关,竟然无法触发。你们用的是多模3网关吗?网关用的固件是哪个版本?是米家原生版本还是alexiit的修改固件? |
|