Use UnitOfMass in integrations (#83930)
This commit is contained in:
parent
c0a7934828
commit
ae9506d0bb
4 changed files with 8 additions and 8 deletions
|
@ -6,10 +6,10 @@ from homeassistant.config_entries import ConfigEntry
|
|||
from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
ELECTRIC_POTENTIAL_MILLIVOLT,
|
||||
MASS_GRAMS,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
UnitOfMass,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -174,7 +174,7 @@ class OmniLogicSaltLevelSensor(OmnilogicSensor):
|
|||
|
||||
if self._unit_type == "Metric":
|
||||
salt_return = round(int(salt_return) / 1000, 2)
|
||||
unit_of_measurement = f"{MASS_GRAMS}/{UnitOfVolume.LITERS}"
|
||||
unit_of_measurement = f"{UnitOfMass.GRAMS}/{UnitOfVolume.LITERS}"
|
||||
|
||||
self._unit = unit_of_measurement
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue