mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-27 19:26:29 +00:00
Add blog post about changes to UnitOfConductivity (#2357)
This commit is contained in:
parent
c99a54ff6c
commit
3188f4996a
31
blog/2024-10-08-unit-of-conductivity-changes.md
Normal file
31
blog/2024-10-08-unit-of-conductivity-changes.md
Normal file
@ -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.
|
Loading…
x
Reference in New Issue
Block a user