Skip to content

Commit

Permalink
Merge pull request #1221 from Joee-D/giotSwitch
Browse files Browse the repository at this point in the history
Support giot.switch.v3oodm
  • Loading branch information
AlexxIT authored Nov 26, 2023
2 parents df280a1 + cba59a4 commit 468f639
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions custom_components/xiaomi_gateway3/core/converters/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3124,6 +3124,26 @@
MapConv("mode_4", "select", mi="5.p.2", map={0: "Wired And Wireless", 1: "Wireless"}),
Converter("backlight", "switch", mi="8.p.1"),
],
}, {
# https://home.miot-spec.com/s/giot.plug.v3oodm
10944: ["Unknown", "Mesh Smart Switch V3", "giot.switch.v3oodm"],
"spec": [
Converter("switch", "switch", mi="2.p.1"),
MapConv("power_on_state", "select", mi="2.p.3", map={
0: "off", 1: "on", 2: "previous"
}),

# Inching mode
BoolConv("inching_mode", "switch", mi="2.p.2"),
MapConv("inching_state", "select", mi="3.p.1", map={False: "off", True: "on"}),
MathConv("inching_time", "number", mi="3.p.2", multiply=0.5, min=1, max=7200,
step=1, round=1),

# LED
MapConv("led", "select", mi="4.p.1", map={
0: "follow_switch", 1: "opposite_to_switch", 2: "off", 3: "on"
})
]
}, {
"default": "mesh", # default Mesh device
"spec": [
Expand Down

0 comments on commit 468f639

Please sign in to comment.