feat: add blood glucose, sound pressure, VOC parts device classes - #148
Draft
bluetoothbot wants to merge 2 commits into
Draft
feat: add blood glucose, sound pressure, VOC parts device classes#148bluetoothbot wants to merge 2 commits into
bluetoothbot wants to merge 2 commits into
Conversation
Add three Home Assistant SensorDeviceClass members that were missing from the mirror: BLOOD_GLUCOSE_CONCENTRATION, SOUND_PRESSURE, and VOLATILE_ORGANIC_COMPOUNDS_PARTS. All three are common BLE sensor readings (glucose meters, noise sensors, ppb-scale VOC). Values match HA exactly. Pin the interop string values with a regression test.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #148 +/- ##
==========================================
+ Coverage 94.37% 94.40% +0.03%
==========================================
Files 12 12
Lines 480 483 +3
Branches 5 5
==========================================
+ Hits 453 456 +3
Misses 26 26
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 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: Add three missing Home Assistant
SensorDeviceClassmembers —BLOOD_GLUCOSE_CONCENTRATION,SOUND_PRESSURE, andVOLATILE_ORGANIC_COMPOUNDS_PARTS.Why: This library mirrors HA's device classes (its stated feature work). These three are common BLE sensor readings — glucose meters, noise/sound-pressure sensors, and ppb/ppm-scale VOC — that had no corresponding enum member, so consumers couldn't tag them with the canonical HA string.
How: Members inserted in their alphabetical regions with HA-exact string values. Picked conflict-free locations away from the device-class lines touched by open PRs #139 (PM1) and #147 (weather classes), so this merges independently.
Testing: New
tests/test_sensor_device_class_health_air.pypins each string value (the HA interop contract). Full suite: 11 passed under 3.12, ruff clean.Quality Report
Changes: 2 files changed, 31 insertions(+)
Code scan: clean
Tests: passed (11 passed)
Branch hygiene: clean
Generated by Kōan