-
Notifications
You must be signed in to change notification settings - Fork 712
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 Aqara T1 wireless mini switch lumi.remote.b1acn02
#2871
Conversation
still missing some button presses dont know how to add those B1ACN01_HOLD = 0 single =1 double =2 tripple =3 quintuple = 5 B1ACN01_RELEASE = 255 many presses = 6 i added the 1, 2, 255, 0 id's next still todo is 3 and 6
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2871 +/- ##
=======================================
Coverage 88.18% 88.19%
=======================================
Files 301 301
Lines 9412 9416 +4
=======================================
+ Hits 8300 8304 +4
Misses 1112 1112 ☔ View full report in Codecov by Sentry. |
@TheJulianJES if youre have some time can you take a look? |
lumi.remote.b1acn02
def __init__(self, *args, **kwargs): | ||
"""Init.""" | ||
self._current_state = None | ||
super().__init__(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed
Can you listen to |
ok here are the button presses single press: event_type: zha_event
data:
device_ieee: 54:ef:44:10:00:92:45:22
unique_id: 54:ef:44:10:00:92:45:22:1:0x0012
device_id: 837a257704ab9d4867023fd954e93d33
endpoint_id: 1
cluster_id: 18
command: single
args:
value: 1
params: {}
origin: LOCAL
time_fired: "2023-12-31T09:27:16.409569+00:00"
context:
id: 01HJZK5WNS741C5BZ4S1N6X79G
parent_id: null
user_id: null double press event_type: zha_event
data:
device_ieee: 54:ef:44:10:00:92:45:22
unique_id: 54:ef:44:10:00:92:45:22:1:0x0012
device_id: 837a257704ab9d4867023fd954e93d33
endpoint_id: 1
cluster_id: 18
command: double
args:
value: 2
params: {}
origin: LOCAL
time_fired: "2023-12-31T09:27:38.593009+00:00"
context:
id: 01HJZK6JB112N6VPSJ71S0EQBX
parent_id: null
user_id: null long press event_type: zha_event
data:
device_ieee: 54:ef:44:10:00:92:45:22
unique_id: 54:ef:44:10:00:92:45:22:1:0x0012
device_id: 837a257704ab9d4867023fd954e93d33
endpoint_id: 1
cluster_id: 18
command: hold
args:
value: 0
params: {}
origin: LOCAL
time_fired: "2023-12-31T09:27:56.482203+00:00"
context:
id: 01HJZK73T2VJHP7MR8FVAY1PP7
parent_id: null
user_id: null release event_type: zha_event
data:
device_ieee: 54:ef:44:10:00:92:45:22
unique_id: 54:ef:44:10:00:92:45:22:1:0x0012
device_id: 837a257704ab9d4867023fd954e93d33
endpoint_id: 1
cluster_id: 18
command: release
args:
value: 255
params: {}
origin: LOCAL
time_fired: "2023-12-31T09:27:59.416019+00:00"
context:
id: 01HJZK76NRXR68CSDN96K0GPH3
parent_id: null
user_id: null the tripple =3 dont show up i think its not in the code but its shows up and the log of zha like the arg value is behind the presses (3, 5, 6) [0x512F:1:0x0012] Received ZCL frame: b'\x18I\nU\x00!\x03\x00'
[0x512F:1:0x0012] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=73, command_id=10, *direction=<Direction.Client_to_Server: 1>)
[0x512F:1:0x0012] Decoded ZCL frame: MultistateInputCluster:Report_Attributes(attribute_reports=[Attribute(attrid=0x0055, value=TypeValue(type=uint16_t, value=3))])
[0x512F:1:0x0012] Received command 0x0A (TSN 73): Report_Attributes(attribute_reports=[Attribute(attrid=0x0055, value=TypeValue(type=uint16_t, value=3))])
[0x512F:1:0x0012] Attribute report received: present_value=3
[0x512F:1:0x0012] Received ZCL frame: b'\x18K\nU\x00!\x05\x00'
[0x512F:1:0x0012] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=75, command_id=10, *direction=<Direction.Client_to_Server: 1>)
[0x512F:1:0x0012] Decoded ZCL frame: MultistateInputCluster:Report_Attributes(attribute_reports=[Attribute(attrid=0x0055, value=TypeValue(type=uint16_t, value=5))])
[0x512F:1:0x0012] Received command 0x0A (TSN 75): Report_Attributes(attribute_reports=[Attribute(attrid=0x0055, value=TypeValue(type=uint16_t, value=5))])
[0x512F:1:0x0012] Attribute report received: present_value=5
[0x512F:1:0x0012] Received ZCL frame: b'\x18L\nU\x00!\x06\x00'
[0x512F:1:0x0012] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=76, command_id=10, *direction=<Direction.Client_to_Server: 1>)
[0x512F:1:0x0012] Decoded ZCL frame: MultistateInputCluster:Report_Attributes(attribute_reports=[Attribute(attrid=0x0055, value=TypeValue(type=uint16_t, value=6))])
[0x512F:1:0x0012] Received command 0x0A (TSN 76): Report_Attributes(attribute_reports=[Attribute(attrid=0x0055, value=TypeValue(type=uint16_t, value=6))])
[0x512F:1:0x0012] Attribute report received: present_value=6 i hope you have all the info you need |
Hey, Just curious, is there an update on this? I've also got the newer version of this switch so if I need to test something, let me know. |
Same issue here... :( |
Tested this quirk with the two additional changes proposed by @WilliamOConnell, it works like a charm! |
When will this quirk be merged and released? |
@TheJulianJES can you take a look what is needed to pass the test??? to be merged |
Any updates? |
These are used by so many people I hope it can merge soon |
Any news when this can be merged and released? |
Good work here!! Thankyou for your efforts. I tried the latest quirk code with my new lumi.remote.b1acn02 and it seemed to work partly. Working Not working I can't seem to get long press working but the single press, double press are working and also the battery is working now too. That got me out of trouble but keen to get the long press working. Let me know if I can help test something. |
for a time-strapped interested party, what file do you need to edit and what do you need to add? Will give it a try and report back as well. |
I have the 'SwitchAQ3B2' model. I added the file to my custom quirks folder, and my button works as expected now (short press, double press, long press and long press release triggers). Great work! Somebody please merge this. |
Follow instructions online, i.e https://community.home-assistant.io/t/how-to-setup-local-zha-quirks/341226 |
Appreciate it, @reineo - being new to HA it would have taken me a good bit of effort to unravel this, but it looks pretty straightforward with your link. |
@TheJulianJES thnx for the review anyone wants to test the following changes? i will try it too but i dont have much experience if it works ill wil chance the code and test it myself |
@TheJulianJES can you check why it fails on the test so we can fix it?? i adjusted the code |
anyone else can test the code i adjusted it tested it and also paired the device several times |
Sorry, ignore the test failure for now. You can test it locally, but we'll try and fix it soon. |
I've tested the new code. I joined a fresh AQ3B2 device, and everything seems to work as expected. All four events are reported (single, double and long press and release). Battery is reported (100%) and the 'identify' functions works. Firmware is reported (0x00000020), but I have no way of verifying that that's correct. |
Tested the quirk. Working as expected. The blueprint I (and many others) used for all previous versions of the Aqara button does not detect the new device. Instead, it is recommended to use a native automation based approach, as described in this post. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing and this should be good to go IMO.
can anyone test the new file it works on my end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, should work fine.
Thanks again!
Could somebody please advise if these changes will make its way into the next update for HA Core? |
They are in 2024.8.2 and work perfectly for me! |
It works great now. Thank you for your efforts to get this fixed! |
So I just need to remove my quirks for this and all good? Nothing more to do? |
Hi all, thanks for your efforts! Unfortunately, for me, my What I did:
I now have the new device "LUMI lumi.remote.b1acn02" in my device list. Observations regarding log on device page:
Observations regarding automations:
For debugging, I
Does anyone have an idea what's missing or what I am doing wrong? Let me know what information/logs I can provide to help. Also, if this questions should better be moved to a new issue, please let me know. |
I had the same issue as you @Rhidus with the same log entries (i.e "LUMI lumi.remote.b1acn02 Toggle event was fired"). What fixed it for me was updating my Zigbee controller (Conbee II) to the latest firmware version. Button works perfect now. |
still missing some button presses
dont know how to add those
B1ACN01_HOLD = 0
single =1
double =2
tripple =3
quintuple = 5
B1ACN01_RELEASE = 255
many presses = 6
i added the 1, 2, 255, 0 id's
next still todo is 3 and 6
Proposed change
Additional information
Fixes #2809
Addresses home-assistant/core#103265
Checklist
pre-commit
checks pass / the code has been formatted using Black