From 31cfbb8a3e11a870aaef3c06e025ddbaeda6ec7e Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:32:06 +0000 Subject: [PATCH] MILLIMOLE_PER_LITER --- homeassistant/const.py | 2 +- homeassistant/util/unit_conversion.py | 2 +- tests/util/test_unit_conversion.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 41068748fd8ea3..dc20627ed7228b 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1357,7 +1357,7 @@ class UnitOfBloodGlucoseConcentration(StrEnum): """Blood glucose concentration units.""" MILLIGRAMS_PER_DECILITER = "mg/dL" - MILLIMOLS_PER_LITER = "mmol/L" + MILLIMOLE_PER_LITER = "mmol/L" # Speed units diff --git a/homeassistant/util/unit_conversion.py b/homeassistant/util/unit_conversion.py index b1c2e4cd309c96..b4fe0a4c7f2747 100644 --- a/homeassistant/util/unit_conversion.py +++ b/homeassistant/util/unit_conversion.py @@ -180,7 +180,7 @@ class BloodGlugoseConcentrationConverter(BaseUnitConverter): UNIT_CLASS = "blood_glucose_concentration" _UNIT_CONVERSION: dict[str | None, float] = { UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER: 18, - UnitOfBloodGlucoseConcentration.MILLIMOLS_PER_LITER: 1, + UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER: 1, } VALID_UNITS = set(UnitOfBloodGlucoseConcentration) diff --git a/tests/util/test_unit_conversion.py b/tests/util/test_unit_conversion.py index d17ab39f0679cf..65e4aa1e1ba47a 100644 --- a/tests/util/test_unit_conversion.py +++ b/tests/util/test_unit_conversion.py @@ -85,7 +85,7 @@ _GET_UNIT_RATIO: dict[type[BaseUnitConverter], tuple[str | None, str | None, float]] = { BloodGlugoseConcentrationConverter: ( UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER, - UnitOfBloodGlucoseConcentration.MILLIMOLS_PER_LITER, + UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER, 18, ), ConductivityConverter: ( @@ -143,11 +143,11 @@ 90, UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER, 5, - UnitOfBloodGlucoseConcentration.MILLIMOLS_PER_LITER, + UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER, ), ( 1, - UnitOfBloodGlucoseConcentration.MILLIMOLS_PER_LITER, + UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER, 18, UnitOfBloodGlucoseConcentration.MILLIGRAMS_PER_DECILITER, ),