|
发表于 2022-12-6 17:03:10
|
显示全部楼层
本帖最后由 flyibeat 于 2022-12-7 11:21 编辑
from custom_components.xiaomi_gateway3.core.converters.devices import *
DEVICES = [{
3685: ["Xiaomi", "Mi Smart Door Lock with Face Unlock X", "XMZNMS06LM"],
"spec": [
MiBeacon, BLEBattery,
MapConv("operation method", "sensor", mi="2.p.1", map={
0: "BLE Outdoor", 1: "Password", 2: "Fingerprint", 4: "Key",
6: "NFC", 7: "One-time Password", 10: "Manual Indoor", 11: "Automatic"
}),
Converter("current time", "sensor", mi="2.p.4", enabled=None),
MapConv("abnormal condition", "sensor", mi="5.p.2", map={
0: "Open Door", 2: "Open Over Time", 5: "Door Stuck", 255: "Others"
}),
],
}] + DEVICES
完整的如上,新编辑器我竟然还不会用
|
|