fix: Deprecated CONCENTRATION_* constants (HA 2027.8) - #1569
Conversation
Replace CONCENTRATION_* with UnitOfRatio/UnitOfDensity and raise the HACS minimum to 2026.7.0. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The Run tests job is red because CI still installs HACS and Hassfest are green. I did not bump the test harness; that would be a repo-wide CI policy change and is out of scope for this deprecation fix. |
|
Will have a look at it, but I have to look into that, as it requires an update of python to >= 3.14 as well |
|
If you merge master into your branch, it should be working again. I've updated pytest-homeassistant-custom-component. |
Ernst79
left a comment
There was a problem hiding this comment.
If you merge master into your branch, it should be working again. I've updated pytest-homeassistant-custom-component.
Pick up the pytest-homeassistant-custom-component / Python 3.14 CI bump from custom-components#1570 so tests can import UnitOfDensity.
Fixes #1568
Replace deprecated
CONCENTRATION_*constants inconst.pywithUnitOfRatio/UnitOfDensity(formaldehyde, CO2, PM2.5, PM10, TVOC). Same string values (ppm,µg/m³,mg/m³); unique_ids unchanged.https://developers.home-assistant.io/blog/2026/06/30/new-unit-enumerators/
hacs.jsonhomeassistant2026.6.0→2026.7.0so HACS does not offer this to Core versions that lack those enums (same approach as #1556).