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 Aqara E1 motion sensor support #3163

Merged
merged 7 commits into from
May 28, 2024
Merged

Add Aqara E1 motion sensor support #3163

merged 7 commits into from
May 28, 2024

Conversation

manymuch
Copy link
Contributor

@manymuch manymuch commented May 22, 2024

Proposed change

lumi.motion.acn001
Aqara E1 motion sensor RTCGQ15LM
https://home.miot-spec.com/s/lumi-acn001

I just borrow it from motion_agl02.
I am not expert in zigbee or zha coding, so there maybe the need for code quality improvements.
But it works in my test for motion, illuminance and battery.

Additional information

Fixes #2189

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

lumi.motion.acn001
Aqara E1 motion sensor RTCGQ15LM
https://home.miot-spec.com/s/lumi-acn001
@manymuch
Copy link
Contributor Author

Tested with home assistant core 2024.5.4.

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.19%. Comparing base (21dd8eb) to head (08618e9).
Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3163      +/-   ##
==========================================
+ Coverage   88.14%   88.19%   +0.04%     
==========================================
  Files         299      300       +1     
  Lines        9389     9400      +11     
==========================================
+ Hits         8276     8290      +14     
+ Misses       1113     1110       -3     

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

@TheJulianJES TheJulianJES changed the title Add support for lumi.motion.acn001 Add Aqara E1 motion sensor support May 24, 2024
@TheJulianJES TheJulianJES added the Xiaomi Request/PR regarding a Xiaomi device label May 24, 2024
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
There are still some changes that should be made before merging this.

I think we can even put the quirk class into the original T1 quirk file to not duplicate the XiaomiManufacturerCluster. The devices are very similar, too.

zhaquirks/xiaomi/aqara/motion_acn001.py Outdated Show resolved Hide resolved
zhaquirks/xiaomi/aqara/motion_acn001.py Outdated Show resolved Hide resolved
zhaquirks/xiaomi/aqara/motion_acn001.py Outdated Show resolved Hide resolved
@manymuch
Copy link
Contributor Author

@TheJulianJES Please check the new commit

@TheJulianJES TheJulianJES dismissed their stale review May 28, 2024 00:50

Implemented changes

@TheJulianJES
Copy link
Collaborator

Thanks! I've also made some more changes and refactored the code a bit.
This should be good now.

@TheJulianJES TheJulianJES merged commit 5ce06cf into zigpy:dev May 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Xiaomi Request/PR regarding a Xiaomi device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] Xiaomi Aqara E1 motion sensor
2 participants