Repository: home-assistant/core
File: tests/util/test_unit_conversion.py (Python)

Code before:
        ),
        (5, UnitOfArea.SQUARE_YARDS, 45.0, UnitOfArea.SQUARE_FEET),
        (5, UnitOfArea.SQUARE_YARDS, 6479.999999999998, UnitOfArea.SQUARE_INCHES),
        (5, UnitOfArea.SQUARE_YARDS, 1.6141528925619832e-06, UnitOfArea.SQUARE_MILES),
        (5, UnitOfArea.SQUARE_YARDS, 0.0010330578512396695, UnitOfArea.ACRES),
    ],
    BloodGlucoseConcentrationConverter: [
        (
            90,
            UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER,
            5,
            UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
        ),
        (
            1,
            UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
            18,
            UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER,
        ),
    ],
    CarbonMonoxideConcentrationConverter: [
        # PPB to other units
        (
            1,
            CONCENTRATION_PARTS_PER_BILLION,
            1000,
            CONCENTRATION_PARTS_PER_MILLION,
        ),
        (
            1,
            CONCENTRATION_PARTS_PER_BILLION,
            1164409.2490,
            CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
        ),
        (
            1,
            CONCENTRATION_PARTS_PER_BILLION,
            1164.4092,
            CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
        ),
        # PPM to other units
        (
            1,
            CONCENTRATION_PARTS_PER_MILLION,
            0.001,
            CONCENTRATION_PARTS_PER_BILLION,
        ),
        (
            1,
            CONCENTRATION_PARTS_PER_MILLION,
            1.16441,

Review comment (bug):
`1 ppb == 0.001 ppm`
commit https://github.com/home-assistant/core/pull/159554/changes/4e9a074a76d489e6b71fdba3737f5b374664659c made the test wrong

Code after:
        ),
        (5, UnitOfArea.SQUARE_YARDS, 45.0, UnitOfArea.SQUARE_FEET),
        (5, UnitOfArea.SQUARE_YARDS, 6479.999999999998, UnitOfArea.SQUARE_INCHES),
        (5, UnitOfArea.SQUARE_YARDS, 1.6141528925619832e-06, UnitOfArea.SQUARE_MILES),
        (5, UnitOfArea.SQUARE_YARDS, 0.0010330578512396695, UnitOfArea.ACRES),
    ],
    BloodGlucoseConcentrationConverter: [
        (
            90,
            UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER,
            5,
            UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
        ),
        (
            1,
            UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
            18,
            UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER,
        ),
    ],
    CarbonMonoxideConcentrationConverter: [
        # PPB to other units
        (
            1,
            CONCENTRATION_PARTS_PER_BILLION,
            0.001,
            CONCENTRATION_PARTS_PER_MILLION,
        ),
        (
            1,
            CONCENTRATION_PARTS_PER_BILLION,
            1.16441,
            CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
        ),
        (
            1,
            CONCENTRATION_PARTS_PER_BILLION,
            0.00116441,
            CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
        ),
        # PPM to other units
        (
            1,
            CONCENTRATION_PARTS_PER_MILLION,
            1000,
            CONCENTRATION_PARTS_PER_BILLION,
        ),
        (
            1,
            CONCENTRATION_PARTS_PER_MILLION,
            1.16441,