Add BPM Vision (48) and BeamO (71) device models - #888
Conversation
Both ids come from a live account with seven Withings devices, where they were the only two reaching to_enum's fallback -- 106 warnings across two days. The account's getdevice response names them directly: model_id 48 is "BPM Vision" and model_id 71 is "BeamO". Closes joostlek#886, which identified 71 by elimination. That reasoning happens to have been right, but the raw_model strings settle it without it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Heads-up: the Precedent suggests Everything else is green. |
`getdevice` returns `"Fluid Analyzer"` as the type for the U-Scan, which
DeviceType did not carry, so it resolved to UNKNOWN and warned on every
fetch. Taken verbatim from a live account's log rather than inferred:
Fluid Analyzer is an unsupported value for <enum 'DeviceType'>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Added one more from the same account, and this one needed no inference at all — That's the U-Scan. Two more unmapped values turned up that I am deliberately not touching here, since I can't establish either the way the raw_model strings established 48 and 71:
Happy to file those separately once I can name them. Suite still 65 passed, ruff clean. (The label point above still stands, if you'd rather I leave that to you.) |
|
Correcting an overstatement in the description above before it stands as evidence it isn't. I wrote that for 71 "the What each identification actually rests on:
Both still hold. But "confirmed by name" was the wrong way to put it, and I'd rather say so than have you find it. A third value, which I am not adding to this PR
Three unmapped ids (48, 71, 102) and three devices at Which is precisely the reasoning that produced two wrong answers in #729, so I'm reporting it rather than committing it. A wrong mapping is worse than a missing one: the device would be silently mislabelled instead of merely warning. What is solid here is the If you want 102 on this evidence, say so and I'll add it with the reasoning in the commit message. Otherwise the definitive answer is the raw And a fourth, unrelated
🤖 Generated with Claude Code |
Closes #886 and #599.
model_id48 is the BPM Vision and 71 is the BeamO.Where that comes from
A live account with seven Withings devices. Those two are the only ones reaching
to_enum's fallback — 106 warnings logged across two days.The identification doesn't rest on elimination this time.
getdevicereturns a human-readablemodelalongsidemodel_id, and this library already keeps it asDevice.raw_model. The account's own response:raw_modelmodel_idExactly two unmapped devices, exactly two unsupported values, and the names come from Withings rather than from a guess.
The order also matches independently:
to_enumwarns while parsing, in array order, and the two distinct messages were first seen as48then71— the same order as positions 4 and 6.Credit where it belongs: 48 is not a new identification. #599 has been open since May 2025 naming it as the BPM Vision, with five reporters. All my capture adds there is the
raw_modelstring confirming it. I said otherwise in a comment on #886 and have corrected that.71 is the one this settles: #729 guessed wrong twice, #886 reasoned it out by elimination, and the
raw_modelstring removes the need for the reasoning.Tests
tests/test_device_models.py: both ids parse to their member with the correctraw_modeland produce no log output, plus a check that a genuinely unknown id still falls back toUNKNOWNand still warns — otherwise this would trade one gap for another.Full suite: 63 passed, 39 snapshots unchanged.
ruff checkandruff format --checkclean on the pinned 0.15.22.One note so it isn't mistaken for a regression: the 100% coverage gate fails on this branch at
tests/test_withings.py:121, and it fails identically on an unmodifiedmain(99.60% there, 99.62% here). Not introduced by this change.Unrelated observation
to_enumwarns on every parse, so an unmapped device produces one warning per device per fetch — that's where 106 came from for two devices. If that's ever felt noisy, warning once per (enum, value) would cut it without losing the report. Happy to open that separately; not folding it in here.🤖 Generated with Claude Code