Skip to content

Commit

Permalink
fix-for-Yeelight-K-Series-Single-Wall-Switch
Browse files Browse the repository at this point in the history
  • Loading branch information
flyibeat authored Oct 31, 2023
1 parent 1f2a5bc commit bdf252c
Showing 1 changed file with 2 additions and 68 deletions.
70 changes: 2 additions & 68 deletions custom_components/xiaomi_gateway3/core/converters/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,73 +1848,7 @@
],
}, {
12456: ["Yeelight", "K Series Double Wall Switch", "YLYKG-0026/0021"],
"spec": [
Converter("channel_1", "switch", mi="2.p.1"),
MapConv("power_on_state_1", "select", mi="2.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
MapConv("wireless_1", "select", mi="2.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("channel_2", "switch", mi="3.p.1"),
MapConv("power_on_state_2", "select", mi="3.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
MapConv("wireless_2", "select", mi="3.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("led", "switch", mi="5.p.1", enabled=False),
MapConv("operatingmode", "select", mi="8.p.1", map={
1: "Top Speed Mode", 2: "Standard Mode"
}, enabled=False),
Converter("action", "sensor", enabled=False),
ButtonMIConv("button_1", mi="14.e.1", value=1),
ButtonMIConv("button_1", mi="14.e.2", value=2),
ButtonMIConv("button_1", mi="14.e.3", value=16),
ButtonMIConv("button_2", mi="15.e.1", value=1),
ButtonMIConv("button_2", mi="15.e.2", value=2),
ButtonMIConv("button_2", mi="15.e.3", value=16),
],
}, {
12457: ["Yeelight", "K Series Triple Wall Switch", "YLYKG-0026/0021"],
"spec": [
Converter("channel_1", "switch", mi="2.p.1"),
MapConv("power_on_state_1", "select", mi="2.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
MapConv("wireless_1", "select", mi="2.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("channel_2", "switch", mi="3.p.1"),
MapConv("power_on_state_2", "select", mi="3.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
MapConv("wireless_2", "select", mi="3.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("channel_3", "switch", mi="4.p.1"),
MapConv("power_on_state_3", "select", mi="4.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
MapConv("wireless_3", "select", mi="4.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("led", "switch", mi="5.p.1", enabled=False),
MapConv("operatingmode", "select", mi="8.p.1", map={
1: "Top Speed Mode", 2: "Standard Mode"
}, enabled=False),
Converter("action", "sensor", enabled=False),
ButtonMIConv("button_1", mi="14.e.1", value=1),
ButtonMIConv("button_1", mi="14.e.2", value=2),
ButtonMIConv("button_1", mi="14.e.3", value=16),
ButtonMIConv("button_2", mi="15.e.1", value=1),
ButtonMIConv("button_2", mi="15.e.2", value=2),
ButtonMIConv("button_2", mi="15.e.3", value=16),
ButtonMIConv("button_3", mi="16.e.1", value=1),
ButtonMIConv("button_3", mi="16.e.2", value=2),
ButtonMIConv("button_3", mi="16.e.3", value=16),
],
}, {
12458: ["Yeelight", "K Series 4-Key Wall Switch", "YLYKG-0028/0023"],
"spec": [
Converter("channel_1", "switch", mi="2.p.1"),
Expand All @@ -1931,14 +1865,14 @@
MapConv("wireless_2", "select", mi="3.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("channel_3", "switch", mi="4.p.1"),
Converter("channel_3", "switch", mi="4.p.1", enabled=None),
MapConv("power_on_state_3", "select", mi="4.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
MapConv("wireless_3", "select", mi="4.p.3", map={
0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"
}, enabled=False),
Converter("channel_4", "switch", mi="12.p.1"),
Converter("channel_4", "switch", mi="12.p.1", enabled=None),
MapConv("power_on_state_4", "select", mi="12.p.2", map={
1: "On", 2: "Off", 3: "Default"
}, enabled=False),
Expand Down

0 comments on commit bdf252c

Please sign in to comment.