Skip to content

Add measurement attribution 10 - #857

Open
Cyrus7 wants to merge 1 commit into
joostlek:mainfrom
Cyrus7:add-measurement-attribution-10
Open

Add measurement attribution 10#857
Cyrus7 wants to merge 1 commit into
joostlek:mainfrom
Cyrus7:add-measurement-attribution-10

Conversation

@Cyrus7

@Cyrus7 Cyrus7 commented Jul 8, 2026

Copy link
Copy Markdown

Proposed Changes

Add the undocumented measurement attribution value 10 to MeasurementAttribution.

Evidence for what it means, from querying measure?action=getmeas directly 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 (position 4/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 it DEVICE_ENTRY_COMPLEMENTARY — happy to rename if you prefer something else (or if Withings ever documents it).

Today to_enum() maps 10 to UNKNOWN, aggregate_measurements() drops UNKNOWN groups, 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 -> 0 and 17 -> 15 remaps in from_api: a regular device measurement variant should not be dropped for lack of documentation.

Related Issues

Fixes #86
Related: home-assistant/core#148256

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
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale There has not been activity on this issue or PR for quite some time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 is an unsupported value for <enum 'MeasurementAttribution'>

1 participant