Lumi.switch.n0acn2 - local quirk needed!

I’ve recently bought what I thought was another aqara t1 (with neutral) in wall light switch control.

Turns out the firmware is different. The first reports as model:-

lumi.switch.n0agl1

Where the more recently purchased one reports as:-

lumi.switch.n0acn2

Without a quirk, both report as a temperature sensor permanently showing:-

image

However, I got the older one working with a quirk from here:-

The device signature of the new device (lumi.switch.n0acn2) is below, and is very very similar to the other one, but I just dont seem to have quite enough knowledge on how to create a quirk for it by using the above as a starting point:-

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4447, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0009",
        "0x000a",
        "0xfcc0"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019",
        "0xffff"
      ]
    },
    "21": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": []
    },
    "31": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": []
    },
    "41": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0012"
      ],
      "out_clusters": []
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.switch.n0acn2",
  "class": "zigpy.device.Device"
}

Any help would be appreciated!

Turns out the only difference between the original device and this new one is two things:-

The model name.

And endpoint 1 has three output clusters as opposed to the original having just 1.

"out_clusters": [
        "0x000a",
        "0x0019",
        "0xffff"
      ]

Its so annoyingly similar, yet I can’t seem to create a quirk (using the original listed above) that the device will pickup and use.

I finally figured out the solution and am leaving it here for anyone else who gets an Aqara T1 module with the same variant (lumi.switch.n0acn2).

Simply use the quirk above and change the models line from this:-

MODELS_INFO: [(LUMI, “lumi.switch.n0agl1”)],

to

MODELS_INFO: [(LUMI, “lumi.switch.n0agl1”),(LUMI, “lumi.switch.n0acn2”)],

And it starts working.!