Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for devices linp.remote.k9b11, linp.switch.qt1db1, linp.sw… #1336

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions custom_components/xiaomi_gateway3/core/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,23 @@
MathConv("humidity", mi="3.p.1008", round=1),
BaseConv("battery", mi="2.p.1003"),
],
}, {
# linp.remote.k9b11
5481: ["Linptech", "Wireless Button", "k9b11"],
"spec": [
# mibeacon2 spec
BLEMapConv("action", "sensor", mi=4097, map={"000000": BUTTON_1_SINGLE, "000001": BUTTON_1_DOUBLE, "000002": BUTTON_1_HOLD, "010000": BUTTON_2_SINGLE, "010001": BUTTON_2_DOUBLE, "010002": BUTTON_2_HOLD}),
BLEByteConv("battery", "sensor", mi=18435, entity=ENTITY_LAZY), # uint8
# miot spec
ConstConv("action", mi="2.e.1", value=BUTTON_1_SINGLE),
ConstConv("action", mi="2.e.2", value=BUTTON_1_DOUBLE),
ConstConv("action", mi="2.e.3", value=BUTTON_1_HOLD),
ConstConv("action", mi="4.e.1", value=BUTTON_2_SINGLE),
ConstConv("action", mi="4.e.2", value=BUTTON_2_DOUBLE),
ConstConv("action", mi="4.e.3", value=BUTTON_2_HOLD),
BaseConv("battery", mi="3.p.1003"),
],
# "ttl": "6h" # battery every 6 hours
}, {
6473: ["Yeelight", "Double Button", "XMWXKG01YL", "yeelink.remote.contrl"],
"spec": [
Expand Down Expand Up @@ -2620,6 +2637,61 @@
ConstConv("action", mi="7.e.1", value=BUTTON_1_SINGLE),
ConstConv("action", mi="7.e.2", value=BUTTON_2_SINGLE),
],
}, {
15658: ["Linptech", "Single Wall Switch QT1", "linp.switch.qt1db1"],
"spec": [
BaseConv("switch", "switch", mi="2.p.1"),
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),
],
}, {
15659: ["Linptech", "Double Wall Switch QT1", "linp.switch.qt1db2"],
"spec": [
BaseConv("channel_1", "switch", mi="2.p.1"),
BaseConv("channel_2", "switch", mi="3.p.1"),
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"}),
ConstConv("action", mi="4.e.1", value=BUTTON_1_SINGLE),
ConstConv("action", mi="5.e.1", value=BUTTON_2_SINGLE),
],
}, {
15660: ["Linptech", "Triple Wall Switch QT1", "linp.switch.qt1db3"],
"spec": [
BaseConv("channel_1", "switch", mi="2.p.1"),
BaseConv("channel_2", "switch", mi="3.p.1"),
BaseConv("channel_3", "switch", mi="4.p.1"),
BoolConv("wireless_1", "switch", mi="2.p.2"),
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"}),
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),
],
}, {
15661: ["Linptech", "Quadruple Wall Switch QT1", "linp.switch.qt1db4"],
"spec": [
BaseConv("channel_1", "switch", mi="2.p.1"),
BaseConv("channel_2", "switch", mi="3.p.1"),
BaseConv("channel_3", "switch", mi="4.p.1"),
BaseConv("channel_4", "switch", mi="5.p.1"),
BoolConv("wireless_1", "switch", mi="2.p.2"),
BoolConv("wireless_2", "switch", mi="3.p.2"),
BoolConv("wireless_3", "switch", mi="4.p.2"),
BoolConv("wireless_4", "switch", mi="5.p.2"),
BaseConv("led", "switch", mi="11.p.1"),
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"}),
],
}, {
2274: ["Linptech", "Lingpu Triple Wall Switch", "linp.switch.q3s3"],
"spec": [
Expand Down
Loading