from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
13203: ["Linptech", "Sliding Window Driver WD2", "WD2", "linp.wopener.wd2lb"],
"spec": [
MapConv("motor", "cover", mi="2.p.1", map={0: "stop", 1: "open", 2: "close"}),
BaseConv("current_position", "sensor", mi="2.p.2"),
BaseConv("battery", "sensor", mi="3.p.1", entity=ENTITY_LAZY),
MapConv("battery_status", "sensor", mi="3.p.3", map={0: "空闲", 1: "适配器", 2: "太阳能", 3: "保护", 4: "Adapter-float"}),
MapConv("防夹手灵敏度", "select", mi="4.p.2", map={0: "极低", 1: "低", 2: "中", 3:"高"}),
MathConv("目标位置", "number", mi="2.p.3", min=1, max=100, entity=ENTITY_CONFIG),
],
}] + DEVICES