ZHA Quirks applied not applied on all lumi.switch.l2aeu1

Hi All, I am fighting with a problem. I have several Aqara H1 switches (single and double rocker and both with and without neutral wire) joined to my ZHA integration. Most of them works without issues, I applied a custom quirk for the non neutral ones to support decoupled mode and here come my issue. Some of the double rocker no neutral switches are working correctly and some of them are not applying the quirk. All are the same model “lumi.switch.l2aeu1” with the same firmware version. I downloaded the diagnostics:

not working one:

    "ieee": "**REDACTED**",
    "nwk": 17962,
    "manufacturer": "LUMI",
    "model": "lumi.switch.l2aeu1",
    "name": "LUMI lumi.switch.l2aeu1",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "quirk_id": null,
    "manufacturer_code": 4447,
    "power_source": "Battery or Unknown",
    "lqi": 96,
    "rssi": -76,
    "last_seen": "2023-11-11T18:14:11",
    "available": true,
    "device_type": "EndDevice",

and the working one:


    "ieee": "**REDACTED**",
    "nwk": 1792,
    "manufacturer": "LUMI",
    "model": "lumi.switch.l2aeu1",
    "name": "LUMI lumi.switch.l2aeu1",
    "quirk_applied": true,
    "quirk_class": "AqaraH1_l1aeu1.AqaraSwitchH1NoNeutral_2G",
    "quirk_id": null,
    "manufacturer_code": 4447,
    "power_source": "Battery or Unknown",
    "lqi": 204,
    "rssi": -49,
    "last_seen": "2023-11-11T18:15:29",
    "available": true,
    "device_type": "EndDevice",

this is the quirk I am using: https://github.com/moroz-slavomir/zha-device-handlers/blob/6c93f7c225df04badc2bcb382d83dd846b27936e/zhaquirks/xiaomi/aqara/switch_h1.py

What could be wrong?

Thanks a lot for help!

Did you ever work this out? I also have a device that has a quirk defined in Zha Device Handlers that is not being applied.

I’m having the same issue, does someone found a solution for this? My two rocker switch are not getting the quirks being applied

Just had the same problem when first binding.

I saw on another forum that sometimes the quirk isn’t being applied properly. Mine certainly wasn’t. I disjoined the device (removed it) and re-joined it and all of a sudden, the quirk was properly applied and I could see the “OppleSwitchCluster” which is the cluster which apparently lets you set the mode to decoupled (so it doesn’t activate the relay). Alas this process is hit and miss, mostly miss.

For example, this one worked after re-joining:

I’ve tried re-joining this one 4 times, same result (no quirk applied).