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 alternative signatures to Aqara T1 Relay #2684

Merged

Conversation

TheJulianJES
Copy link
Collaborator

@TheJulianJES TheJulianJES commented Oct 28, 2023

Proposed change

Adds two alternative signatures with the Metering and ElectricalMeasurement clusters for the Aqara T1 relay.
One from Discord:

Signature 1
{
  "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.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 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": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x0000",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0009",
        "0x000a",
        "0x0702",
        "0x0b04",
        "0xfcc0"
      ],
      "output_clusters": [
        "0x0006",
        "0x000a",
        "0x0019"
      ]
    },
    "21": {
      "profile_id": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x000c"
      ],
      "output_clusters": []
    },
    "31": {
      "profile_id": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x000c"
      ],
      "output_clusters": []
    },
    "41": {
      "profile_id": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x0012"
      ],
      "output_clusters": []
    },
    "242": {
      "profile_id": "0xa1e0",
      "device_type": "0x0061",
      "input_clusters": [],
      "output_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.switch.n0agl1",
  "class": "zigpy.device.Device"
}

Another one from GitHub: #1231 (comment)

Additional information

Seems to work for first signature. The other alternative signature only slightly differs, so should be fine too.

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ddb102c) 86.89% compared to head (9bd470a) 86.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2684   +/-   ##
=======================================
  Coverage   86.89%   86.90%           
=======================================
  Files         282      282           
  Lines        8628     8634    +6     
=======================================
+ Hits         7497     7503    +6     
  Misses       1131     1131           
Files Coverage Δ
zhaquirks/xiaomi/aqara/switch_t1.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheJulianJES TheJulianJES changed the title Add alternative signature to Aqara T1 Relay Add alternative signatures to Aqara T1 Relay Oct 28, 2023
@TheJulianJES TheJulianJES added the new quirk Adds support for a new device label Oct 28, 2023
@TheJulianJES TheJulianJES marked this pull request as ready for review October 28, 2023 17:24
@TheJulianJES TheJulianJES merged commit 3fddad0 into zigpy:dev Nov 9, 2023
14 checks passed
elupus pushed a commit to elupus/zha-device-handlers that referenced this pull request Jan 17, 2024
* Add alternative signature to Aqara T1 Relay

* Also add `lumi.switch.n0acn2`, even though unconfirmed

* Add yet another alternative signature: zigpy#1231 (comment)
lgraf pushed a commit to lgraf/zha-device-handlers that referenced this pull request May 6, 2024
* Add alternative signature to Aqara T1 Relay

* Also add `lumi.switch.n0acn2`, even though unconfirmed

* Add yet another alternative signature: zigpy#1231 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new quirk Adds support for a new device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant