Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/number/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class NumberDeviceClass(StrEnum):
VOLATILE_ORGANIC_COMPOUNDS = "volatile_organic_compounds"
"""Amount of VOC.

Unit of measurement: `µg/m³`
Unit of measurement: `µg/m³`, `ppb`
"""

VOLTAGE = "voltage"
Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/sensor/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class SensorDeviceClass(StrEnum):
VOLATILE_ORGANIC_COMPOUNDS = "volatile_organic_compounds"
"""Amount of VOC.

Unit of measurement: `µg/m³`
Unit of measurement: `µg/m³`, `ppb`
"""

VOLTAGE = "voltage"
Expand Down Expand Up @@ -487,7 +487,8 @@ class SensorStateClass(StrEnum):
UnitOfTemperature.FAHRENHEIT,
},
SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS: {
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_MILLION,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ppb is parts per billion, not million. Is this intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. But this pull is going no where. A new device class needs to be added.

},
SensorDeviceClass.VOLTAGE: set(UnitOfElectricPotential),
SensorDeviceClass.VOLUME: set(UnitOfVolume),
Expand Down