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

Lack of Support for Aqara Switch Z1(lumi.switch.acn048) #1271

Open
ComLin010 opened this issue Jan 23, 2024 · 1 comment
Open

Lack of Support for Aqara Switch Z1(lumi.switch.acn048) #1271

ComLin010 opened this issue Jan 23, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ComLin010
Copy link

Hi ALex
I tried to write a converter, but it doesn't work except for the switch function. I'm using an E1 template. Can you add support for Z1?
https://home.miot-spec.com/s/lumi.switch.acn048

This is the template for E1 ↓

"lumi.switch.b1lc04": ["Aqara", "Single Wall Switch E1 (no N)", "QBKG38LM"],
    # "support": 5,
    "spec": [
        Converter("switch", "switch", mi="2.p.1"),
        ButtonMIConv("button", mi="6.e.1", value=1),
        ButtonMIConv("button", mi="6.e.2", value=2),
        Action,
        BoolConv("led", "switch", mi="3.p.1", enabled=False),  # uint8
        MapConv("power_on_state", "select", mi="4.p.1", map=POWEROFF_MEMORY,
                enabled=False),
        BoolConv("wireless", "switch", mi="6.p.1", enabled=False),
        MapConv("mode", "select", mi="10.p.1", map=SWITCH_MODE, enabled=False)
    ],

This is the Z1 template I wrote ↓

from custom_components.xiaomi_gateway3.core.converters.devices import *

DEVICES = [{
    "lumi.switch.acn048": ["Aqara", "Switch Z1", "ZNQBKG38LM"],
    "spec": [
        Converter("switch", "switch", mi="5.p.1"),  # bool
        ButtonMIConv("button", mi="6.e.1", value=1),
        Action,
        BoolConv("led", "switch", mi="4.p.1", enabled=False),  # uint8
        MapConv("power_on_state", "select", mi="5.p.4", map=POWEROFF_MEMORY,#断电记忆
                enabled=False),
        BoolConv("wireless", "switch", mi="5.p.2", enabled=False),
        
    ],
}] + DEVICES
@AlexxIT AlexxIT added the question Further information is requested label Feb 19, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Feb 19, 2024

I don't see problems in your version. All looks fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants