From 3188f4996ab30249c3c035d035203e01b93e9cf2 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 8 Oct 2024 15:49:17 +0200 Subject: [PATCH] Add blog post about changes to UnitOfConductivity (#2357) --- ...2024-10-08-unit-of-conductivity-changes.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 blog/2024-10-08-unit-of-conductivity-changes.md diff --git a/blog/2024-10-08-unit-of-conductivity-changes.md b/blog/2024-10-08-unit-of-conductivity-changes.md new file mode 100644 index 00000000..8956c9a5 --- /dev/null +++ b/blog/2024-10-08-unit-of-conductivity-changes.md @@ -0,0 +1,31 @@ +--- +author: Erik Montnemery +authorURL: https://github.com/emontnemery +title: "Changes to the UnitOfConductivity enum" +--- + +The `UnitOfConductivity` enum has been changed from: + +```py + class UnitOfConductivity(StrEnum): + """Conductivity units.""" + + SIEMENS = "S/cm" + MICROSIEMENS = "µS/cm" + MILLISIEMENS = "mS/cm" +``` + +To: + +```py + class UnitOfConductivity(StrEnum): + """Conductivity units.""" + + SIEMENS_PER_CM = "S/cm" + MICROSIEMENS_PER_CM = "µS/cm" + MILLISIEMENS_PER_CM = "mS/cm" +``` + +The old enum members can be used during a deprecation period of one year, to give time for custom integrations to migrate to the new enum members. + +See [core PR #127919](https://github.com/home-assistant/core/pull/127919) for implementation details.