from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
12261: ["linju", "Lingju Bluetooth Mesh Switch", "(linju.switch.sw0a01)"],
"spec": [
BaseConv("switch", "switch", mi="2.p.1"), # bool
BoolConv("指示灯开关", "switch", mi="3.p.2"),
BoolConv("R脚辅助开关", "switch", mi="3.p.6"),
MapConv("灵动模式", "select", mi="3.p.4", map={
0: "关闭", 1: "开启"
}),
MapConv("通电后默认状态", "select", mi="2.p.2", map={
0: "恢复断电前状态", 1: "开启", 2: "关闭"
}),
MapConv("互控功能", "select", mi="3.p.3", map={
1: "互控", 2: "解控"
}),
MapConv("icon-style", "select", mi="3.p.5", map={
0: "灯泡", 1: "射灯", 2: "吸顶灯", 3: "吊灯", 4: "灯带", 5: "小家电", 6: "插座", 7: "阀门", 8: "电机"
}),
],
}] + DEVICES