zha-device-handlers
zha-device-handlers copied to clipboard
[Device Support Request] Add ZHA Support for Virtual Click Events in Decoupled Mode - Aqara H1 EU (lumi.switch.l1aeu1)
Problem description
Hi everyone,
I’d like to request native support in ZHA for virtual button press events from the Aqara H1 EU wall switch (lumi.switch.l1aeu1) when it’s in decoupled mode.
:mag_right: Current Behaviour
When using this switch with the ZHA integration:
I can successfully enable decoupled mode via Zigbee cluster 0xFCC0, attribute 0x0200.
However, no zha_event or any other event is fired when the button is pressed in this mode.
There are also no entities or triggers exposed in Home Assistant when in decoupled mode.
This makes it impossible to use the switch as a wireless button unless it’s controlling the relay directly, which defeats the purpose of using it with smart bulbs or virtual automations.
:white_check_mark: Expected Behaviour
When in decoupled mode, the switch should:
Fire a zha_event (or similar) on button press.
Include basic metadata like:
{ “device_id”: “…”, “command”: “single_press” }
Allow users to use the switch purely as a scene controller or trigger, as supported in Zigbee2MQTT.
:test_tube: Additional Notes
This is currently fully supported in Zigbee2MQTT via custom converters.
There is a partial workaround using custom quirks that map cluster 0xFCC0 to XiaomiOppleCluster, which exposes a raw attribute_updated event, but:
This is not user-friendly
Not documented or intuitive
Lacks clean event names like single_press, double_press, etc.
:pray: Why This Matters
The H1 EU is one of the most popular and widely available Zigbee wall switches in the EU. Many users want to:
Use it as a wireless scene trigger
Avoid toggling the relay when using smart bulbs
Use ZHA without having to switch to Zigbee2MQTT
This feature would greatly increase the flexibility and usability of ZHA for users in Europe.
Happy to provide logs, test devices, or help with development if needed! Thanks a lot in advance :pray:
Solution description
Allow users to use the switch purely as a scene controller or trigger, as supported in Zigbee2MQTT.
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]
Device signature
Device signature
[{
"node_descriptor": {
"logical_type": 2,
"complex_descriptor_available": 0,
"user_descriptor_available": 0,
"reserved": 0,
"aps_flags": 0,
"frequency_band": 8,
"mac_capability_flags": 128,
"manufacturer_code": 4447,
"maximum_buffer_size": 127,
"maximum_incoming_transfer_size": 100,
"server_mask": 11264,
"maximum_outgoing_transfer_size": 100,
"descriptor_capability_field": 0
},
"endpoints": {
"1": {
"profile_id": "0x0104",
"device_type": "0x0000",
"input_clusters": [
"0x0000",
"0x0002",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0009",
"0x0012",
"0xfcc0"
],
"output_clusters": [
"0x000a",
"0x0019"
]
},
"41": {
"profile_id": "0x0104",
"device_type": "0x0000",
"input_clusters": [
"0x0012"
],
"output_clusters": []
},
"242": {
"profile_id": "0xa1e0",
"device_type": "0x0061",
"input_clusters": [],
"output_clusters": [
"0x0021"
]
}
},
"manufacturer": "LUMI",
"model": "lumi.switch.l1aeu1",
"class": "zhaquirks.xiaomi.aqara.switch_h1_single.AqaraH1SingleRockerSwitchNoNeutral"
}
Diagnostic information
Diagnostic information
[Paste the diagnostic information here]
Logs
Logs
[Paste the logs here]
Custom quirk
Custom quirk
[from zigpy.profiles import zha
from zigpy.zcl.clusters.general import Basic
from zhaquirks.xiaomi import BasicCluster, XiaomiCustomDevice
from zhaquirks.xiaomi.mija.sensor_switch import XiaomiOppleCluster
class AqaraH1SingleDecoupled(XiaomiCustomDevice):
"""Custom quirk for Aqara H1 EU (lumi.switch.l1aeu1) in decoupled mode."""
signature = {
"models_info": [("LUMI", "lumi.switch.l1aeu1")],
"endpoints": {
1: {
"profile_id": zha.PROFILE_ID,
"device_type": 0x0100,
"input_clusters": [
0x0000, # Basic
0x0004, # Groups
0x0005, # Scenes
0xFCC0, # Xiaomi-specific Opple cluster
],
"output_clusters": [0x0006], # On/Off relay
}
},
}
replacement = {
"endpoints": {
1: {
"profile_id": zha.PROFILE_ID,
"device_type": 0x0100,
"input_clusters": [
BasicCluster,
XiaomiOppleCluster,
],
"output_clusters": [0x0006],
}
},
}
]
Additional information
With this in place, ZHA will receive low-level events like this when the button is pressed: { "event_type": "zha_event", "data": { "device_id": "abc123", "command": "attribute_updated", "args": { "attribute_id": 247, "value": 1 } } }