1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add comment on conversion factor for Carbon monoxide on dependency molecular weight (#152535)

This commit is contained in:
Jan Bouwhuis
2025-09-18 15:36:12 +02:00
committed by GitHub
parent 017a84a859
commit 472d70b6c9

View File

@@ -174,7 +174,9 @@ class CarbonMonoxideConcentrationConverter(BaseUnitConverter):
UNIT_CLASS = "carbon_monoxide"
_UNIT_CONVERSION: dict[str | None, float] = {
CONCENTRATION_PARTS_PER_MILLION: 1,
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER: 1.145609,
# concentration (mg/m3) = 0.0409 x concentration (ppm) x molecular weight
# Carbon monoxide molecular weight: 28.01 g/mol
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER: 0.0409 * 28.01,
}
VALID_UNITS = {
CONCENTRATION_PARTS_PER_MILLION,