Add Aqara FP300 presence sensor quirk #4504
Open
+1,004
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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