Skip to content

fix: replace deprecated CONCENTRATION_* constants with UnitOfDensity/… - #346

Open
riccardorossi92 wants to merge 1 commit into
gvigroux:masterfrom
riccardorossi92:master
Open

fix: replace deprecated CONCENTRATION_* constants with UnitOfDensity/…#346
riccardorossi92 wants to merge 1 commit into
gvigroux:masterfrom
riccardorossi92:master

Conversation

@riccardorossi92

Copy link
Copy Markdown

Summary

Fixes deprecation warnings logged at HA startup for the hon integration by replacing two deprecated constants in sensor.py.

Changes

  • CONCENTRATION_MICROGRAMS_PER_CUBIC_METERUnitOfDensity.MICROGRAMS_PER_CUBIC_METER
  • CONCENTRATION_PARTS_PER_MILLIONUnitOfRatio.PARTS_PER_MILLION

Both constants are deprecated and will be removed in HA Core 2027.8. This updates the PM2.5/PM10 and VOC (ppm) sensors to use the current homeassistant.const API.

Closes #345

…UnitOfRatio

Replaced CONCENTRATION_MICROGRAMS_PER_CUBIC_METER and
CONCENTRATION_PARTS_PER_MILLION, deprecated and slated for removal in
HA Core 2027.8, with UnitOfDensity.MICROGRAMS_PER_CUBIC_METER and
UnitOfRatio.PARTS_PER_MILLION in sensor.py.
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.

Deprecated Constants

1 participant