Skip to content

docs: correct PM1 particulate size bound (1 μm, not 0.1 μm) - #139

Draft
bluetoothbot wants to merge 1 commit into
Bluetooth-Devices:mainfrom
bluetoothbot:koan/fix-pm1-size-doc
Draft

docs: correct PM1 particulate size bound (1 μm, not 0.1 μm)#139
bluetoothbot wants to merge 1 commit into
Bluetooth-Devices:mainfrom
bluetoothbot:koan/fix-pm1-size-doc

Conversation

@bluetoothbot

@bluetoothbot bluetoothbot commented May 24, 2026

Copy link
Copy Markdown

What: Fix the PM1 device-class comment — it documented particulate matter <= 0.1 μm, which is wrong.

Why: PM1 is particulate matter up to 1 micrometer, consistent with the rest of the family (PM4 <= 4 μm, PM10 <= 10 μm, and HA's own pm1 definition). 0.1 μm is PM0.1 — a different, finer fraction. Wrong API docs mislead integrators about what a pm1 entity actually measures.

How: One-line comment correction in sensor/device_class.py. The enum value ("pm1") was already correct, so this is documentation-only — no behavior change. Added a small regression test pinning the PM-family device-class identifiers, following the repo's existing == "value" convention (test_init.py), since those strings are the Home Assistant interop contract.

Testing: pytest tests/ — 10 passed (8 existing + 2 new).


Quality Report

Changes: 2 files changed, 21 insertions(+), 1 deletion(-)

Code scan: clean

Tests: passed (10 passed)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

The PM1 SensorDeviceClass comment claimed particulate matter <= 0.1 μm.
PM1 is defined as particulate matter up to 1 micrometer (per the EPA/ISO
naming the rest of the family follows: PM4 <= 4 μm, PM10 <= 10 μm). The
0.1 μm threshold is PM0.1, a different fraction.

Add a regression test pinning the PM family device-class identifiers,
since those string values are the interop contract with Home Assistant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.37%. Comparing base (31bd826) to head (4ee8e18).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #139   +/-   ##
=======================================
  Coverage   94.37%   94.37%           
=======================================
  Files          12       12           
  Lines         480      480           
  Branches        5        5           
=======================================
  Hits          453      453           
  Misses         26       26           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant