-
Notifications
You must be signed in to change notification settings - Fork 928
Add Aqara FP300 presence sensor quirk #4504
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
base: dev
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #4504 +/- ##
==========================================
+ Coverage 92.24% 92.36% +0.11%
==========================================
Files 369 372 +3
Lines 12094 12280 +186
==========================================
+ Hits 11156 11342 +186
Misses 938 938 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I just tested it. It behaves well. One small remark: unlike the z2m version, the PIR detection state is missing (it triggers before the presence sensor is activated, which is handy for responsiveness). |


Proposed change
This PR adds a custom quirk for the Aqara FP300 presence sensor
(manufacturer:
LUMI, model:lumi.sensor_occupy.agl8) toxiaomi.Key points:
AqaraFP300ManuClusterbased onXiaomiAqaraE1Clusterfor the manufacturer-specific cluster0xFCC0.0x00F7so that:0xff01-23is mapped toBATTERY_VOLTAGE_MV0xff01-24is mapped toBATTERY_PERCENTAGE_REMAINING_ATTRIBUTEXiaomiPowerConfigurationPercent, reusing the existing Xiaomi battery logic.FP300DetectionRangeClusteras aLocalDataClusterto handle the detection range for the FP300:0x019A(typeoctet string) on cluster0xFCC0prefix+ 24-bit range mask)This allows ZHA to support the FP300 with:
Additional information
Fixes #4487
Device diagnostics
zha-bb791876a15e4fd9b338fdb8a62f7a7c-Aqara lumi.sensor_occupy.agl8-c0ba404a3f7cc423c2650a543896d981.json
Checklist
pre-commitchecks pass / the code has been formatted using Black