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 yeelink.switch.sw14 & yeelink.switch.sw6 #1573

Open
Mercy0310 opened this issue Feb 28, 2025 · 0 comments
Open

Add support yeelink.switch.sw14 & yeelink.switch.sw6 #1573

Mercy0310 opened this issue Feb 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Mercy0310
Copy link

# These two switches can be used with a coordination converter.
# I removed the `default-power-on-state` parameter because it's more convenient to adjust it in the Mi Home app.
17295: ["Yeelight", "Yeelight Lingdong Smart Switch (Four Keys)", "N5-ZNMB-4AC", "yeelink.switch.sw6"],
23399: ["Yeelight", "Yeelight K Smart Switch (Four Keys) Mesh 2.0", "YLYKG-0181", "yeelink.switch.sw14"],
"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"),
    MapConv("wireless_1", "select", mi="2.p.6", map={0: "default", 1: "Wireless"}),  # config
    MapConv("wireless_2", "select", mi="3.p.4", map={0: "default", 1: "Wireless"}),  # config
    MapConv("wireless_3", "select", mi="4.p.4", map={0: "default", 1: "Wireless"}),  # config
    MapConv("wireless_4", "select", mi="5.p.4", map={0: "default", 1: "Wireless"}),  # config
    BaseConv("indicator-light", "light", mi="11.p.1"),  # config
    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("action", mi="6.e.2.p.1", map={1: BUTTON_1_DOUBLE, 2: BUTTON_2_DOUBLE, 3: BUTTON_3_DOUBLE, 4: BUTTON_4_DOUBLE}),
    MapConv("action", mi="6.e.3.p.1", map={1: BUTTON_1_HOLD, 2: BUTTON_2_HOLD, 3: BUTTON_3_HOLD, 4: BUTTON_4_HOLD}),
],
Image Image
@AlexxIT AlexxIT added the enhancement New feature or request label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants