Any one have this device properly working in ZHA ?
Its usable without a quirk, but shows up as a light with three entities (even though I only have the single gang version), and I believe it also has power monitoring.
Any one have this device properly working in ZHA ?
Its usable without a quirk, but shows up as a light with three entities (even though I only have the single gang version), and I believe it also has power monitoring.
I’ve managed to change the device domain from a light to a switch using the ZHA configuration using the instructions here:
I’ve also hidden the other unusable light entities, but it would still be nice to have this device properly supported.
Hi, I recently got few of these in double rocker version.
Same, it works fine but it shows up in HA as 3 lights.
I also noticed that on z2m all actions are supported Aqara QBKG41LM control via MQTT | Zigbee2MQTT
including single clic, double clic and hold for each side and both together.
Is there any way for me to help getting this device supported?
Same here and I found the exact same information.
I even tried integrating the switches with z2m and my SLZB-06M but had no luck with single and double clicks.
For the single switch, it is possible to change the click mode accoding to this page:
I would really appreciate if someone could help me out and explain, how I can integrate these 2 types of switches into my ZHA.
I also found quirks for the remote switches E1 and H1:
Can anyone explain, how to edit these quirks to make the switches with neutral work on ZHA?
Thank you very much!
So I played around with the h1 double rocker quirk and came up with this:
"""Aqara E1 double rocker switch quirks."""
from zigpy.profiles import zgp, zha
from zigpy.zcl.clusters.general import (
Alarms,
Basic,
DeviceTemperature,
GreenPowerProxy,
Groups,
Identify,
MultistateInput,
OnOff,
Ota,
Scenes,
Time,
)
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
)
from zhaquirks.xiaomi import LUMI
from zhaquirks.xiaomi.aqara.opple_switch import XiaomiOpple2ButtonSwitchBase
class AqaraE1DoubleRockerSwitchWithNeutral(XiaomiOpple2ButtonSwitchBase):
"""Aqara H1 Double Rocker Switch (with neutral)."""
signature = {
MODELS_INFO: [(LUMI, "lumi.switch.b2nc01")],
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], 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,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[0, 3, 4, 5, 6], output_clusters=[]
3: {
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,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[], output_clusters=[33]
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
}
Keep in mind that this is my first time ever touching quirks and using home asssistant in general.
This quirks adds the switch correctly but:
If you have any ideas, I am happy to test on my switches.
In the meantime this quirk let’s you use the basic actions and it works with decoupled mode.
For some unknown reasons, my switch totally changed signature yesterday while I was testing. I don’t know if it’s related to an update or something I did but here is the new quirk with both signatures:
"""Aqara E1 double rocker switch quirks."""
from zigpy.profiles import zgp, zha
from zigpy.zcl.clusters.general import (
Alarms,
Basic,
DeviceTemperature,
GreenPowerProxy,
Groups,
Identify,
MultistateInput,
OnOff,
Ota,
Scenes,
Time,
)
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
)
from zhaquirks.xiaomi import LUMI
from zhaquirks.xiaomi.aqara.opple_switch import (
OppleSwitchCluster,
XiaomiOpple2ButtonSwitchBase,
)
class AqaraE1DoubleRockerSwitchWithNeutral(XiaomiOpple2ButtonSwitchBase):
"""Aqara E1 Double Rocker Switch (with neutral)."""
signature = {
MODELS_INFO: [(LUMI, "lumi.switch.b2nc01")],
ENDPOINTS: {
# input_clusters=[0, 2, 3, 4, 5, 6, 18, 64704], 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,
MultistateInput.cluster_id,
OppleSwitchCluster.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: [],
},
# input_clusters=[0, 3, 4, 5, 6], output_clusters=[]
3: {
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,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[18], output_clusters=[]
41: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
MultistateInput.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[18], output_clusters=[]
42: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
MultistateInput.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[18], output_clusters=[]
51: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
MultistateInput.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[], output_clusters=[33]
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
}
class AqaraE1DoubleRockerSwitchWithNeutralAlt(XiaomiOpple2ButtonSwitchBase):
"""Aqara H1 Double Rocker Switch (with neutral)."""
signature = {
MODELS_INFO: [(LUMI, "lumi.switch.b2nc01")],
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], 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,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[0, 3, 4, 5, 6], output_clusters=[]
3: {
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,
],
OUTPUT_CLUSTERS: [],
},
# input_clusters=[], output_clusters=[33]
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
}
Still the same issue though, power usage and other power measurements do not work.