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

pull/152560/head
Jan Bouwhuis 2025-09-18 15:36:12 +02:00 committed by GitHub
parent 017a84a859
commit 472d70b6c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

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,