Skip to content

Add support for Xiaomi Smart Wall Switch (2 Gang) #1614

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kei81131
Copy link
Contributor

@kei81131 kei81131 commented Jun 13, 2025

https://home.miot-spec.com/spec/xiaomi.switch.w2
小米智能开关(双开)
image

{
    # https://home.miot-spec.com/spec/xiaomi.switch.w2
    21607: ["Xiaomi", "Xiaomi Smart Wall Switch (2 Gang)", "XMS01BXS", "xiaomi.switch.w2"],
    "spec": [
        BaseConv("action", "sensor"),
        ConstConv("action", mi="4.e.1", value=BUTTON_1_SINGLE),
        ConstConv("action", mi="4.e.2", value=BUTTON_1_DOUBLE),
        ConstConv("action", mi="4.e.3", value=BUTTON_1_HOLD),
        ConstConv("action", mi="5.e.1", value=BUTTON_2_SINGLE),
        ConstConv("action", mi="5.e.2", value=BUTTON_2_DOUBLE),
        ConstConv("action", mi="5.e.3", value=BUTTON_2_HOLD),
        BaseConv("switch_1", "switch", mi="2.p.1"),
        BaseConv("switch_2", "switch", mi="3.p.1"),
        BaseConv("indicator_light", "switch", mi="7.p.1"),
        MapConv("switch_mode_1", "select", mi="2.p.2", map={0: "Wired And Wireless", 1: "Wireless"}),
        MapConv("switch_mode_2", "select", mi="3.p.2", map={0: "Wired And Wireless", 1: "Wireless"}),
        MapConv("sensor_mode_1", "select", mi="4.p.1", map={0: "Quick Singel Click", 1: "Multiple Click"}),
        MapConv("sensor_mode_2", "select", mi="5.p.1", map={0: "Quick Singel Click", 1: "Multiple Click"}),
    ],
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants