docs: correct PM1 particulate size bound (1 μm, not 0.1 μm) - #139
Draft
bluetoothbot wants to merge 1 commit into
Draft
docs: correct PM1 particulate size bound (1 μm, not 0.1 μm)#139bluetoothbot wants to merge 1 commit into
bluetoothbot wants to merge 1 commit into
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
What: Fix the
PM1device-class comment — it documented particulate matter<= 0.1 μm, which is wrong.Why:
PM1is particulate matter up to 1 micrometer, consistent with the rest of the family (PM4 <= 4 μm,PM10 <= 10 μm, and HA's ownpm1definition).0.1 μmis PM0.1 — a different, finer fraction. Wrong API docs mislead integrators about what apm1entity 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