Skip to content

Commit

Permalink
Add new Lingju mesh switch #1330
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 23, 2024
1 parent eae6c6e commit 1466a1a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions custom_components/xiaomi_gateway3/core/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3243,6 +3243,17 @@
MapConv("action", mi="5.e.2.p.2", map={1: BUTTON_1_DOUBLE, 2: BUTTON_2_DOUBLE, 3: BUTTON_3_DOUBLE, 4: BUTTON_BOTH_DOUBLE}),
MapConv("action", mi="5.e.3.p.2", map={1: BUTTON_1_HOLD, 2: BUTTON_2_HOLD, 3: BUTTON_3_HOLD, 4: BUTTON_BOTH_HOLD}),
]
}, {
12261: ["Lingju", "Bluetooth Mesh Switch", "linju.switch.sw0a01"],
"spec": [
BaseConv("switch", "switch", mi="2.p.1"), # bool
MapConv("power_on_state", "select", mi="2.p.2", map={0: "default", 1: "on", 2: "off"}),
BoolConv("led", "switch", mi="3.p.2"),
MapConv("interactive_switch", "select", mi="3.p.3", map={1: "control", 2: "decontrol"}, entity=ENTITY_CONFIG),
BoolConv("flex_switch", "switch", mi="3.p.4", entity=ENTITY_CONFIG),
MapConv("icon_style", "select", mi="3.p.5", map={0: "Lamp-bulb", 1: "Cylindrical-spotlight", 2: "Ceiling-light", 3: "Hanging-lamp", 4: "Lamp-belt", 5: "Small-electric-appliance", 6: "Socket", 7: "Valve", 8: "Electrical-machinery"}, entity=ENTITY_CONFIG),
BoolConv("pilot_switch", "switch", mi="3.p.6", entity=ENTITY_CONFIG),
],
}, {
"default": "mesh", # default Mesh device
"spec": [
Expand Down

0 comments on commit 1466a1a

Please sign in to comment.