Skip to content

Commit

Permalink
Add support linp.curtain.c2, linp.wopener.wd2lb and update Linptech S…
Browse files Browse the repository at this point in the history
…witch QT1

#1348
  • Loading branch information
AlexxIT committed Dec 27, 2024
1 parent ed22062 commit 501835f
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions custom_components/xiaomi_gateway3/core/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3052,8 +3052,10 @@
BoolConv("wireless", "switch", mi="2.p.2"),
BaseConv("led", "switch", mi="11.p.1"),
BaseConv("action", "sensor"),
MapConv("touch", "select", mi="12.p.1", map={0: "Off", 1: "Low", 2: "Medium", 3: "High"}),
ConstConv("action", mi="3.e.1", value=BUTTON_SINGLE),
MapConv("touch", "select", mi="12.p.1", map={0: "Off", 1: "Low", 2: "Medium", 3: "High"}),
MathConv("brightness_white", "number", mi="12.p.5", min=0, max=100, entity=ENTITY_CONFIG),
MathConv("brightness_orange", "number", mi="12.p.6", min=0, max=100, entity=ENTITY_CONFIG),
],
}, {
15659: ["Linptech", "Double Wall Switch QT1", "linp.switch.qt1db2"],
Expand All @@ -3063,10 +3065,12 @@
BoolConv("wireless_1", "switch", mi="2.p.2"),
BoolConv("wireless_2", "switch", mi="3.p.2"),
BaseConv("led", "switch", mi="11.p.1"),
BaseConv("action", "sensor"),
MapConv("touch", "select", mi="12.p.1", map={0: "Off", 1: "Low", 2: "Medium", 3: "High"}),
BaseConv("action", "sensor"),
ConstConv("action", mi="4.e.1", value=BUTTON_1_SINGLE),
ConstConv("action", mi="5.e.1", value=BUTTON_2_SINGLE),
MathConv("brightness_white", "number", mi="12.p.5", min=0, max=100, entity=ENTITY_CONFIG),
MathConv("brightness_orange", "number", mi="12.p.6", min=0, max=100, entity=ENTITY_CONFIG),
],
}, {
15660: ["Linptech", "Triple Wall Switch QT1", "linp.switch.qt1db3"],
Expand All @@ -3078,11 +3082,13 @@
BoolConv("wireless_2", "switch", mi="3.p.2"),
BoolConv("wireless_3", "switch", mi="4.p.2"),
BaseConv("led", "switch", mi="11.p.1"),
BaseConv("action", "sensor"),
MapConv("touch", "select", mi="12.p.1", map={0: "Off", 1: "Low", 2: "Medium", 3: "High"}),
BaseConv("action", "sensor"),
ConstConv("action", mi="5.e.1", value=BUTTON_1_SINGLE),
ConstConv("action", mi="6.e.1", value=BUTTON_2_SINGLE),
ConstConv("action", mi="7.e.1", value=BUTTON_3_SINGLE),
MathConv("brightness_white", "number", mi="12.p.5", min=0, max=100, entity=ENTITY_CONFIG),
MathConv("brightness_orange", "number", mi="12.p.6", min=0, max=100, entity=ENTITY_CONFIG),
],
}, {
15661: ["Linptech", "Quadruple Wall Switch QT1", "linp.switch.qt1db4"],
Expand All @@ -3099,6 +3105,8 @@
BaseConv("action", "sensor"),
MapConv("action", mi="6.e.1.p.1", map={1: BUTTON_1_SINGLE, 2: BUTTON_2_SINGLE, 3: BUTTON_3_SINGLE, 4: BUTTON_4_SINGLE}),
MapConv("touch", "select", mi="12.p.1", map={0: "Off", 1: "Low", 2: "Medium", 3: "High"}),
MathConv("brightness_white", "number", mi="12.p.5", min=0, max=100, entity=ENTITY_CONFIG),
MathConv("brightness_orange", "number", mi="12.p.6", min=0, max=100, entity=ENTITY_CONFIG),
],
}, {
2274: ["Linptech", "Lingpu Triple Wall Switch", "linp.switch.q3s3"],
Expand Down Expand Up @@ -4137,6 +4145,16 @@
BaseConv("current_temp", mi="4.p.1"),
BaseConv("target_temp", mi="2.p.3"),
],
}, {
13203: ["Linptech", "Casement Window Driver WD2", "linp.wopener.wd2lb"],
"spec": [
MapConv("motor", "cover", mi="2.p.1", map={0: "stop", 1: "open", 2: "close"}),
CurtainPosConv("position", mi="2.p.2"),
BaseConv("target_position", mi="2.p.3"),
BaseConv("battery", "sensor", mi="3.p.1", entity=ENTITY_LAZY),
MapConv("battery_status", "sensor", mi="3.p.3", map={0: "Idle", 1: "Adapter", 2: "Solar", 3: "Protected", 4: "Adapter-float"}, entity=ENTITY_DIAGNOSTIC),
MapConv("anti_pinch_sensitivity", "select", mi="4.p.2", map={0: "Very Low", 1: "Low", 2: "Medium", 3: "High"}, entity=ENTITY_CONFIG),
],
}, {
"default": "mesh", # default Mesh device
"spec": [
Expand Down

0 comments on commit 501835f

Please sign in to comment.