Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions zhaquirks/xiaomi/aqara/switch_h1_double.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,54 @@ class AqaraH1DoubleRockerSwitchNoNeutralAlt(XiaomiOpple2ButtonSwitchBase):
},
},
}


class AqaraH1DoubleRockerSwitchNoNeutralAlt2(XiaomiOpple2ButtonSwitchBase):
"""Aqara H1 Double Rocker Switch (no neutral). Alarms on EP1, Opple on EP2."""

signature = {
MODELS_INFO: [(LUMI, "lumi.switch.l2aeu1")],
Comment on lines +243 to +247
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR’s description/title focus on adding the “Opple on EP1+EP2, no extra endpoints” signature variant, but this diff also adds a new variant for a different signature shape (“Alarms on EP1, Opple on EP2”). Either update the PR description/title to include this additional variant (and why it’s needed here vs PR #4360), or drop this extra change to keep the PR scoped to the stated variant.

Copilot uses AI. Check for mistakes.
ENDPOINTS: {
# input_clusters=[0, 2, 3, 4, 5, 6, 9], output_clusters=[10, 25]
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
DeviceTemperature.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
Alarms.cluster_id,
],
OUTPUT_CLUSTERS: [
Time.cluster_id,
Ota.cluster_id,
],
},
# input_clusters=[0, 3, 4, 5, 6, 18, 64704], output_clusters=[]
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
MultistateInput.cluster_id,
OppleSwitchCluster.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
}
Comment on lines +243 to +291
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new signature variant class is introduced here, but the added test only asserts signature matching for AqaraH1DoubleRockerSwitchNoNeutral2. If this variant is intended to stay, please add a corresponding assert_signature_matches_quirk test case for AqaraH1DoubleRockerSwitchNoNeutral4 so future refactors don’t silently break matching for this signature shape.

Suggested change
class AqaraH1DoubleRockerSwitchNoNeutralAlt2(XiaomiOpple2ButtonSwitchBase):
"""Aqara H1 Double Rocker Switch (no neutral). Alarms on EP1, Opple on EP2."""
signature = {
MODELS_INFO: [(LUMI, "lumi.switch.l2aeu1")],
ENDPOINTS: {
# input_clusters=[0, 2, 3, 4, 5, 6, 9], output_clusters=[10, 25]
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
DeviceTemperature.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
Alarms.cluster_id,
],
OUTPUT_CLUSTERS: [
Time.cluster_id,
Ota.cluster_id,
],
},
# input_clusters=[0, 3, 4, 5, 6, 18, 64704], output_clusters=[]
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
MultistateInput.cluster_id,
OppleSwitchCluster.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
}

Copilot uses AI. Check for mistakes.
Loading