Add measurement attribution 10 - #857
Open
Cyrus7 wants to merge 1 commit into
Open
Conversation
Body Cardio weigh-ins emit pulse wave velocity (type 91) as two measurement groups: the whole-body value with attribution 8 and a complementary per-position group (position 4/5, left/right foot) with the undocumented attribution 10. Unknown attributions map to UNKNOWN, which aggregate_measurements() drops, so the positional readings are silently discarded and every poll logs an unsupported-value warning. Fixes joostlek#86
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 Changes
Add the undocumented measurement attribution value
10toMeasurementAttribution.Evidence for what it means, from querying
measure?action=getmeasdirectly on an affected account (Body Cardio + BPM Connect, aiowithings 3.1.6 via Home Assistant 2026.7.1): every Body Cardio weigh-in emits pulse wave velocity (meastype 91) as two measurement groups with the same timestamp —{ "date": "2026-07-08T07:34:55Z", "attrib": 8, "measures": [{ "type": 91, "value": 7705, "unit": -3, "position": null }] } { "date": "2026-07-08T07:34:55Z", "attrib": 10, "measures": [{ "type": 91, "value": 7721, "unit": -3, "position": 4 }] }The attrib-8 group is the whole-body PWV; the attrib-10 group is the complementary per-position reading (
position4/5 = left/right foot). This confirms the observation in #86 that attrib 10 arrives with meastype 91: it marks a complementary/derived device measurement attached to a regular device session. This PR names itDEVICE_ENTRY_COMPLEMENTARY— happy to rename if you prefer something else (or if Withings ever documents it).Today
to_enum()maps 10 toUNKNOWN,aggregate_measurements()dropsUNKNOWNgroups, so the positional readings are silently discarded and every consumer poll re-logs the unsupported-value warning — users with daily weigh-ins get spammed (the linked HA issues report hundreds of warnings per day).Adding the value follows the same pragmatism as the existing
8 -> 0and17 -> 15remaps infrom_api: a regular device measurement variant should not be dropped for lack of documentation.Related Issues
Fixes #86
Related: home-assistant/core#148256